Makefile.def: Remove libjava.

2016-09-30  Andrew Haley  <aph@redhat.com>

	* Makefile.def: Remove libjava.
	* Makefile.tpl: Likewise.
	* Makefile.in: Regenerate.
	* configure.ac: Likewise.
	* configure: Likewise.
	* gcc/java: Remove.
	* libjava: Likewise.

From-SVN: r240662
This commit is contained in:
Andrew Haley 2016-09-30 16:24:48 +00:00 committed by Andrew Haley
parent eae993948b
commit 07b78716af
24062 changed files with 10 additions and 2642255 deletions

View File

@ -1,3 +1,13 @@
2016-09-30 Andrew Haley <aph@redhat.com>
* Makefile.def: Remove libjava.
* Makefile.tpl: Likewise.
* Makefile.in: Regenerate.
* configure.ac: Likewise.
* configure: Likewise.
* gcc/java: Remove.
* libjava: Likewise.
2016-09-28 Claudiu Zissulescu <claziss@synopsys.com>
* MAINTAINERS (Reviewers): Add myself.

File diff suppressed because it is too large Load Diff

View File

@ -1,20 +0,0 @@
2014-10-27 David Malcolm <dmalcolm@redhat.com>
Patch autogenerated by rename_gimple_subclasses.py from
https://github.com/davidmalcolm/gcc-refactoring-scripts
revision 7d754b63ff2bf47226a67b2c0af5d74b54d4709f
* java-gimplify.c (java_gimplify_block): Rename gimple subclass types.
2014-10-24 David Malcolm <dmalcolm@redhat.com>
Introduce gimple_bind and use it for accessors.
* java-gimplify.c (java_gimplify_block): Update local to be a
gimple_bind rather than just a gimple.
Copyright (C) 2014 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.

View File

@ -1,14 +0,0 @@
2014-09-24 David Malcolm <dmalcolm@redhat.com>
* ChangeLog.jit: Add copyright footer.
2013-10-11 David Malcolm <dmalcolm@redhat.com>
* lang.c (java_handle_option): Update for introduction of
gcc::dump_manager.
Copyright (C) 2013-2014 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.

View File

@ -1,25 +0,0 @@
2007-06-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
* except.c (build_exception_object_ref):
Use fold_build1 instead of build1 for NEGATE_EXPR.
2007-05-12 Andrew Pinski <andrew_pinski@playstation.sony.com>
* class.c (make_class_data): Build the index in sizetype.
Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
adding to a pointer type.
(build_symbol_entry): Likewise.
* expr.c (build_java_arrayaccess): Likewise.
(build_field_ref): Likewise.
(build_known_method_ref): Likewise.
(build_invokevirtual): Likewise.
* except.c (build_exception_object_ref): Do a
NEGATIVE and then a POINTER_PLUS_EXPR instead
of a MINUS_EXPR.
Copyright (C) 2007 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.

View File

@ -1,367 +0,0 @@
2004-05-10 Andrew Haley <aph@redhat.com>
* java-gimplify.c (java_gimplify_expr): Copy the LHS of a binary
expression into a temporary variable.
(java_gimplify_new_array_init): Set the DECL_CONTEXT of array and
tmp to current_function_decl.
2004-04-13 Diego Novillo <dnovillo@redhat.com>
* expr.c (build_expr_wfl): Don't check type nodes for
side effects.
2004-04-12 Diego Novillo <dnovillo@redhat.com>
* decl.c (java_expand_stmt): Remove.
* lang.c (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
2004-02-24 Richard Henderson <rth@redhat.com>
* java-gimplify.c (java_gimplify_new_array_init): Remove extra
argument building BLOCK.
2004-02-19 Steven Bosscher <stevenb@suse.de>
* decl.c (poplevel): Don't output nested inline functions.
2004-02-16 Richard Henderson <rth@redhat.com>
* builtins.c (java_build_function_call_expr): Add static chain
operand to call_expr.
2004-01-29 Richard Henderson <rth@redhat.com>
PR java/12906
* decl.c (maybe_pushlevels): Careful with TREE_CHAIN when
registering decls with push_jvm_slot.
2003-12-10 Diego Novillo <dnovillo@redhat.com>
* parse.y (resolve_field_access): Remove superfluous
initialization of decl.
2003-12-10 Richard Henderson <rth@redhat.com>
* lang.c (java_post_options): Don't ever use rtl inlining.
2003-12-06 Jan Hubicka <jh@suse.cz>
* parse.y (resolve_field_access): Initialize decl.
2003-11-31 Richard Henderson <rth@redhat.com>
* lang.c (java_start_inlining): Remove.
(LANG_HOOKS_TREE_INLINING_START_INLINING): Remove.
2003-11-31 Richard Henderson <rth@redhat.com>
* jcf-parse.c (java_parse_file): Finalize cgraph after emitting
class tables.
2003-11-24 Richard Henderson <rth@redhat.com>
* Make-lang.in (parse.o): Remove -Wno-error.
2003-11-20 Richard Henderson <rth@redhat.com>
* constants.c (build_constant_data_ref): Lay out the array type.
2003-11-20 Richard Henderson <rth@redhat.com>
* class.c (build_indirect_class_ref): Use convert.
* constants.c (build_constant_data_ref): Fix type on the decl
and return that directly.
(build_constants_constructor): Remove kruft to match.
(build_ref_from_constant_pool): Use ARRAY_REF.
* expr.c (build_java_indirect_ref): Use convert.
(build_known_method_ref): Likewise.
* parse.y (patch_string_cst): Likewise.
* class.c (finish_class): Kill code to output_inline_function.
2003-11-12 Jason Merrill <jason@redhat.com>
PR optimization/12547
* lang.c (java_tree_inlining_walk_subtrees): Restore.
(LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Restore.
2003-11-12 Richard Henderson <rth@redhat.com>
* java-gimplify.c (java_gimplify_expr): Use annotate_with_locus
instead of annotate_all_with_locus.
2003-11-10 Richard Henderson <rth@redhat.com>
* expr.c: Use append_to_statement_list instead of add_tree.
2003-10-30 Richard Henderson <rth@redhat.com>
* java-gimplify.c (cleanup_compound_expr): Remove.
(cleanup_try_finally_expr): Remove.
(java_gimplify_expr): Don't call them.
(java_gimplify_case_expr): Use create_artificial_label.
(java_gimplify_default_expr): Likewise.
2003-10-30 Richard Henderson <rth@redhat.com>
* expr.c (expand_java_switch, expand_java_add_case): New.
(LOOKUP_SWITCH, TABLE_SWITCH): Use them.
2003-10-23 Richard Henderson <rth@redhat.com>
* java-gimplify.c (java_gimplify_expr): Return gimplify_status.
2003-10-14 Richard Henderson <rth@redhat.com>
* decl.c (finish_method): Set cfun->function_end_locus.
* java-gimplify.c (java_gimplify_expr): Set input_location
for EXPR_WITH_FILE_LOCATION. Use annotate_all_with_locus.
* parse.h (DECL_SOURCE_LINE_MERGE): Remove.
(DECL_SOURCE_LINE_FIRST, DECL_SOURCE_LINE_LAST): Remove.
* parse.y (missing_return_error): Use DECL_FUNCTION_LAST_LINE.
(finish_method_declaration): Likewise.
(start_artificial_method_body): Likewise.
(lookup_cl): Use DECL_SOURCE_LINE.
(start_complete_expand_method): Likewise.
(java_complete_lhs): Fix IS_EXPR_CODE_CLASS check.
2003-10-13 Richard Henderson <rth@redhat.com>
* decl.c (java_add_stmt): Use annotate_with_locus.
2003-10-13 Richard Henderson <rth@redhat.com>
* expr.c (build_java_jsr): Don't emit LABEL_EXPR or
load_type_state here.
2003-10-12 Richard Henderson <rth@redhat.com>
* class.c (build_utf8_ref, get_dispatch_table): Set TREE_INVARIANT.
(make_class_data, build_symbol_entry, emit_symbol_table): Likewise.
* decl.c (java_init_decl_processing): Likewise.
* except.c (prepare_eh_table_type): Likewise.
* parse.y (patch_assignment, patch_binop): Likewise.
(patch_string_cst, patch_new_array_init): Likewise.
* resource.c (compile_resource_data): Likewise.
2003-10-08 Jeff Sturm <jsturm@one-point.com>
* decl.c (cgraph.h): Include.
(tree-inline.h, tree-dump.h, tree-flow.h): Remove includes.
(complete_start_java_method): Remove.
(start_java_method): Combine with complete_start_java_method.
Remove dead code.
(end_java_method): Don't patch or expand tree.
Use finish_method.
(finish_method): New function.
(java_expand_body): Use tree_rest_of_compilation.
(java_expand_stmt): New function.
* java-gimplify.c (tree-dump.h): Include.
(java_genericize): New function.
(dump_java_tree): Declare. New function.
* java-tree.h (start_complete_expand_method): Remove declaration.
(complete_start_java_method): Remove declaration.
(finish_method, java_expand_stmt, java_genericize): Declare.
* lang.c (LANG_HOOKS_RTL_EXPAND_STMT): Define.
* parse.y (tree-inline.h, tree-dump.h, tree-flow.h,
cgraph.h): Remove includes.
(start_complete_expand_method): Declare.
(source_end_java_method): Don't expand tree. Use finish_method.
Reset current_function_decl.
(java_expand_method_bodies): Don't patch tree for class
initialization or method synchronization.
2003-10-01 Richard Henderson <rth@redhat.com>
* decl.c (end_java_method): Invoke remove_useless_stmts_and_vars
and lower_eh_constructs.
* parse.y (source_end_java_method): Likewise.
2003-09-24 Jason Merrill <jason@redhat.com>
* decl.c, jcf-parse.c, jcf-write.c, parse.h, parse.y, resource.c:
Revert from TREE_LOCUS to DECL_SOURCE_LOCATION.
2003-09-18 Richard Henderson <rth@redhat.com>
* lang.c (java_estimate_num_insns): Take an expr, not a decl.
2003-08-12 Diego Novillo <dnovillo@redhat.com>
* java-gimplify.c (java_gimplify_block): If the body is a
NULL_TREE, return an empty statement.
2003-08-08 Jason Merrill <jason@redhat.com>
* parse.y (source_end_java_method): Support
!keep_function_tree_in_gimple_form.
Do TDI_generic dump.
2003-07-31 Andrew Haley <aph@redhat.com>
* java-tree.h: (add_stmt_to_compound): New function.
(java_add_stmt): New function.
(java_add_local_var): New function.
(get_stmts): New function.
* java-gimplify.c (java_gimplify_block): Allow for null body.
* except.c (link_handler): Set h->stmt.
(expand_start_java_handler): Build a TRY_CATCH_EXPR for this
range; don't expand_eh_region_start.
(expand_end_java_handler): Rewrite.
* java-except.h (stmt): New field.
* expr.c (flush_quick_stack): Replace expand_assignment with
java_add_stmt.
(java_stack_dup): Replace emit_move_insn with java_add_stmt.
(build_java_athrow): Replace expand_expr_stmt with java_add_stmt.
(build_java_jsr): Replace emit_jump with java_add_stmt (build (GOTO_EXPR))
(build_java_ret): Replace expand_computed_goto with
java_add_stmt (build (GOTO_EXPR))
(expand_java_arraystore): Replace expand_assignment with
java_add_stmt.
(expand_java_return): Replace expand_return with
java_add_stmt (build (RETURN_EXPR))
(expand_load_internal): Remove layout_decl, DECL_REGISTER,
expand_decl, and expand_decl_init. Instead, add the local
variable and a MODIFY_EXPR to the current tree.
(expand_iinc): Replace expand_assignment with
java_add_stmt.
(expand_compare): Replace expand_cond with
java_add_stmt(build (COND_EXPR))
(expand_java_goto): Replace expand_goto with
java_add_stmt (build (GOTO_EXPR))
(expand_invoke): Replace expand_expr_stmt with java_add_stmt.
(build_jni_stub): Generate a BIND_EXPR to hold the block we've
created. Don't distinguish between source and byte compiler.
(expand_java_field_op): Replace expand_assignment with
java_add_stmt.
(java_expand_expr): Abort. No-one should call this function any
more.
(expand_byte_code): Replace expand_label with
java_add_stmt (build (LABEL_EXPR))
(process_jvm_instruction): Replace build (JAVA_EXC_OBJ_EXPR) with
build_exception_object_ref. Replace expand_assignment with
java_add_stmt.
* except.c (link_handler): Null stmt field.
(expand_start_java_handler): Don't expand_eh_region_start.
Instead, generate a TRY_CATCH_EXPR and insert it into the tree
we're building.
(expand_end_java_handler): Don't expand_start_all_catch. Instead,
build a TRY_FINALLY_EXPR and wrap the catch block with it.
Don't expand_end_all_catch.
* decl.c (push_jvm_slot): Call pushdecl().
(find_local_variable): Give symbolic names to unnamed local
variables.
(struct binding_level: stmts): New field.
(poplevel): If any statements have been generated at this level,
create a BIND_EXPR to hold them and copy the variables to it. If
we are at the outermost level, save this BIND_EXPR in the
DECL_SAVED_TREE of this function.
(maybe_pushlevels): Don't expand_start_bindings.
(maybe_poplevels): Don't expand_end_bindings.
(complete_start_java_method): Reorganize static initialization and
synchronization logic for source compiler. Remove pushlevel and
expand_start_bindings for byte compiler.
(end_java_method): Don't expand_end_bindings. Add static
initialization and synchronization logic for byte compiler.
Set cfun->x_whole_function_mode_p.
Call gimplify_function_tree and optimize_function_tree and
expand_expr_stmt.
(add_stmt_to_compound): New.
(java_add_stmt): New.
(java_add_local_var): New.
(get_stmts): New.
* parse.y (add_stmt_to_compound): Remove.
* jcf-parse.c (parse_class_file): Don't call expand_expr_stmt for
a native method -- we'll do that later.
2003-07-27 Andreas Jaeger <aj@suse.de>
* expr.c (build_expr_wfl): Convert remaining K&R prototypes
to ISO C90.
2003-06-28 Jeff Sturm <jsturm@one-point.com>
* java-gimplify.c (java_gimplify_block): Rebuild BLOCK_SUBBLOCKS.
* lang.c (flag_disable_gimple): Remove initialization.
2003-06-23 Jeff Law <law@redhat.com>
* Make-lang.in (java-gimplify.o): Add dependencies.
2003-06-22 Jeff Sturm <jsturm@one-point.com>
* parse.y (source_end_java_method): Don't attempt to inline
or optimize trees if flag_disable_gimple.
* Make-lang.in (JAVA_OBJS): Remove java-tree-inline.o.
2003-06-21 Jeff Sturm <jsturm@one-point.com>
* Make-lang.in (JAVA_OBJS): Add java-gimplify.o.
* decl.c (java_init_decl_processing): Initialize size_type_node.
(complete_start_java_method): Update DECL_SAVED_TREE.
(dump_function): Remove.
(java_optimize_inline): Remove.
* expr.c (always_initialize_class_p): Initialize to 1.
(build_instanceof): Build proper boolean condition.
(build_class_init): Set DECL_INITIAL for init_test_decl.
(force_evaluation_order): Don't save_expr a void expr node.
* java-gimplify.c: New file.
* java-tree.h (java_gimplify_expr): Declare.
* lang.c (java_tree_inlining_walk_subtrees): Remove declaration.
(flag_optimize_sci): Initialize to 0.
(LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove define.
(LANG_HOOKS_SIMPLIFY_EXPR): Add define.
(java_tree_inlining_walk_subtrees): Remove function.
(java_init): Set flag_disable_gimple to 1.
* parse.y (source_end_java_method): Set cfun->x_whole_function_mode_p.
Gimplify. Optimize tree before expanding. Update comments.
(java_expand_method_bodies): Always save DECL_SAVED_TREE.
(patch_invoke): Don't save_expr force_evaluation_order result.
(patch_assignment): Use simpler compound expression.
(patch_if_else_statement): Don't optimize constant condition nodes.
2003-03-02 Diego Novillo <dnovillo@redhat.com>
* class.c: Replace DECL_SOURCE_FILE with TREE_FILENAME and
DECL_SOURCE_LINE with TREE_LINENO everywhere.
2003-02-03 Diego Novillo <dnovillo@redhat.com>
* parse.y (qualify_ambiguous_name): Initialize variable 'decl'.
2003-01-15 Jeff Law <law@redhat.com>
* class.c: Use TREE_FILENAME and TREE_LINENO to extract file/line
information from tree nodes. Use annotate_with_file_line to
annotate tree nodes with file/line information.
* decl.c, jcf-parse.c, jcf-write.c, parse.h: Likewise.
* parse.y: Likewise.
* expr.c (java_expand_expr): Handle EXPR_WITH_FILE_LOCATION nodes.
(build_expr_wfl): New function.
* java-tree.def (EXPR_WITH_FILE_LOCATION): New node.
* java-tree.h (EXPR_WFL_*): New macros.
(build_expr_wfl): Declare.
Local Variables:
mode: change-log
change-log-default-name: "ChangeLog.tree-ssa"
End:
Copyright (C) 2003-2004 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.

View File

@ -1,343 +0,0 @@
# Top level -*- makefile -*- fragment for the GNU compiler for the Java(TM)
# language.
# Copyright (C) 1996-2016 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 3, 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 COPYING3. If not see
#<http://www.gnu.org/licenses/>.
#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.
# This file provides the language dependent support in the main Makefile.
# Each language makefile fragment must provide the following targets:
#
# foo.all.cross, foo.start.encap, foo.rest.encap,
# foo.install-common, foo.install-man, foo.install-info, foo.install-pdf,
# foo.install-html, foo.info, foo.dvi, foo.pdf, foo.html, foo.uninstall,
# foo.mostlyclean, foo.clean, foo.distclean,
# foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
#
# where `foo' is the name of the language.
#
# It should also provide rules for:
#
# - making any compiler driver (eg: g++)
# - the compiler proper (eg: jc1)
# - define the names for selecting the language in LANGUAGES.
# 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)')
XGCJ = gcj
# Define the names for selecting java in LANGUAGES.
java: jc1$(exeext) $(XGCJ)$(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 = jcf-dump
# Tell GNU make to ignore these if they exist.
.PHONY: java
CFLAGS-java/jvspec.o += $(DRIVER_DEFINES)
# Create the compiler driver for $(XGCJ).
$(XGCJ)$(exeext): $(GCC_OBJS) java/jvspec.o java/jcf-path.o \
libcommon-target.a $(LIBDEPS) $(EXTRA_GCC_OBJS)
+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(GCC_OBJS) \
java/jvspec.o java/jcf-path.o $(EXTRA_GCC_OBJS) libcommon-target.a \
$(EXTRA_GCC_LIBS) $(LIBS)
# Create a version of the $(XGCJ) driver which calls the cross-compiler.
$(XGCJ)-cross$(exeext): $(XGCJ)$(exeext)
-rm -f $(XGCJ)-cross$(exeext)
cp $(XGCJ)$(exeext) $(XGCJ)-cross$(exeext)
java.srcextra:
# Executables built by this Makefile:
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-depend.o \
java/jcf-path.o java/boehm.o java/java-gimplify.o hash-table.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 ggc-none.o hash-table.o
JVGENMAIN_OBJS = java/jvgenmain.o java/mangle_name.o
java_OBJS = $(sort $(JAVA_OBJS) $(JCFDUMP_OBJS) $(JVGENMAIN_OBJS)) java/jvspec.o
# Use strict warnings for this front end.
java-warn = $(STRICT_WARN)
# String length warnings
java/jvspec.o-warn = -Wno-error
jc1$(exeext): $(JAVA_OBJS) $(BACKEND) $(LIBDEPS) attribs.o
rm -f $@
+$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
$(JAVA_OBJS) $(BACKEND) $(ZLIB) $(LIBICONV) $(LIBS) attribs.o $(BACKENDLIBS)
jcf-dump$(exeext): $(JCFDUMP_OBJS) $(LIBDEPS)
rm -f $@
+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(JCFDUMP_OBJS) \
$(CPPLIBS) $(ZLIB) $(LDEXP_LIB) $(LIBS)
jvgenmain$(exeext): $(JVGENMAIN_OBJS) $(LIBDEPS)
rm -f $@
+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(JVGENMAIN_OBJS) \
$(LIBS)
#
# Build hooks:
java.all.cross: $(XGCJ)-cross$(exeext)
java.start.encap: $(XGCJ)$(exeext)
java.rest.encap:
java.tags: force
cd $(srcdir)/java; etags -o TAGS.sub *.c *.h --language=none \
--regex='/DEFTREECODE [(]\([A-Z_]+\)/\1/' java-tree.def; \
etags --include TAGS.sub --include ../TAGS.sub
java.info: doc/gcj.info
java.srcinfo: doc/gcj.info
-cp -p $^ $(srcdir)/doc
java.dvi: doc/gcj.dvi
JAVA_PDFFILES = doc/gcj.pdf
java.pdf: $(JAVA_PDFFILES)
JAVA_HTMLFILES = $(build_htmldir)/java
java.html: $(JAVA_HTMLFILES)/index.html
JAVA_MANFILES = doc/gcj.1 doc/jcf-dump.1 doc/gij.1 \
doc/jv-convert.1 doc/grmic.1 \
doc/gcj-dbtool.1 doc/gc-analyze.1 doc/aot-compile.1 \
doc/rebuild-gcj-db.1
java.man: $(JAVA_MANFILES)
java.srcman: $(JAVA_MANFILES)
-cp -p $^ $(srcdir)/doc
check-java :
check-java-subtargets :
# Install hooks:
# jc1, gcj, and jvgenmain are installed elsewhere as part
# of $(COMPILERS).
# Install gcj as well as the target-independent tools.
java.install-common: installdirs
-if [ -f $(XGCJ)$(exeext) ]; then \
rm -f $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
$(INSTALL_PROGRAM) $(XGCJ)$(exeext) $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
chmod a+x $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
if [ -f $(XGCJ)-cross$(exeext) ]; then \
true; \
else \
rm -f $(DESTDIR)$(bindir)/$(JAVA_TARGET_INSTALL_NAME)$(exeext); \
( cd $(DESTDIR)$(bindir) && \
$(LN) $(JAVA_INSTALL_NAME)$(exeext) $(JAVA_TARGET_INSTALL_NAME)$(exeext) ); \
fi ; \
fi ; \
for tool in $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS); do \
tool_transformed_name=`echo $$tool|sed '$(program_transform_name)'`; \
if [ -f $$tool$(exeext) ]; then \
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); \
fi ; \
done
java.install-plugin:
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)/jcf-dump$(man1ext)
-rm -rf $(DESTDIR)$(man1dir)/gij$(man1ext)
-rm -rf $(DESTDIR)$(man1dir)/jv-convert$(man1ext)
-rm -rf $(DESTDIR)$(man1dir)/gcj-dbtool$(man1ext)
-rm -rf $(DESTDIR)$(man1dir)/aot-compile$(man1ext)
-rm -rf $(DESTDIR)$(man1dir)/rebuild-gcj-db$(man1ext)
java.install-info: $(DESTDIR)$(infodir)/gcj.info
java.install-pdf: $(JAVA_PDFFILES)
@$(NORMAL_INSTALL)
test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)/gcc"
@list='$(JAVA_PDFFILES)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(pdf__strip_dir) \
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/gcc/$$f'"; \
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/gcc/$$f"; \
done
java.install-html: $(JAVA_HTMLFILES)
@$(NORMAL_INSTALL)
test -z "$(htmldir)" || $(mkinstalldirs) "$(DESTDIR)$(htmldir)"
@list='$(JAVA_HTMLFILES)'; for p in $$list; do \
if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
f=$(html__strip_dir) \
if test -d "$$d$$p"; then \
echo " $(mkinstalldirs) '$(DESTDIR)$(htmldir)/$$f'"; \
$(mkinstalldirs) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
$(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
else \
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
fi; \
done
#
# Clean hooks:
# A lot of the ancillary files are deleted by the main makefile.
# We just have to delete files specific to us.
java.mostlyclean:
-rm -f java/*$(objext) $(DEMANGLER_PROG)
-rm -f java/*$(coverageexts)
-rm -f jc1$(exeext) $(XGCJ)$(exeext) jvgenmain$(exeext) \
jcf-dump$(exeext) s-java
java.clean:
java.distclean:
-rm -f java/config.status java/Makefile
java.maintainer-clean:
-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
-rm -f $(docobjdir)/gcj-dbtool.1
-rm -f $(docobjdir)/gc-analyze.1
-rm -f $(docobjdir)/aot-compile.1
-rm -f $(docobjdir)/rebuild-gcj-db.1
#
# Stage hooks:
# The main makefile has already created stage?/java.
java.stage1: stage1-start
-mv java/*$(objext) stage1/java
java.stage2: stage2-start
-mv java/*$(objext) stage2/java
java.stage3: stage3-start
-mv java/*$(objext) stage3/java
java.stage4: stage4-start
-mv java/*$(objext) stage4/java
java.stageprofile: stageprofile-start
-mv java/*$(objext) stageprofile/java
java.stagefeedback: stageprofile-start
-mv java/*$(objext) stagefeedback/java
#
# jcf-io.o needs $(ZLIBINC) added to cflags.
CFLAGS-java/jcf-io.o += $(ZLIBINC)
# jcf-path.o needs a -D.
CFLAGS-java/jcf-path.o += \
-DLIBGCJ_ZIP_FILE='"$(datadir)/java/libgcj-$(version).jar"' \
-DDEFAULT_TARGET_VERSION=\"$(version)\"
TEXI_JAVA_FILES = java/gcj.texi $(gcc_docdir)/include/fdl.texi \
$(gcc_docdir)/include/gpl_v3.texi $(gcc_docdir)/include/gcc-common.texi \
gcc-vers.texi
# Documentation
doc/gcj.info: $(TEXI_JAVA_FILES)
if test "x$(BUILD_INFO)" = xinfo; then \
rm -f doc/gcj.info*; \
$(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \
-I $(gcc_docdir)/include -o $@ $<; \
else true; fi
doc/gcj.dvi: $(TEXI_JAVA_FILES)
$(TEXI2DVI) -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<
doc/gcj.pdf: $(TEXI_JAVA_FILES)
$(TEXI2PDF) -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<
$(build_htmldir)/java/index.html: $(TEXI_JAVA_FILES)
$(mkinstalldirs) $(@D)
rm -f $(@D)/*
$(TEXI2HTML) -I $(gcc_docdir) -I $(gcc_docdir)/include \
-I $(srcdir)/java -o $(@D) $<
.INTERMEDIATE: gcj.pod jcf-dump.pod gij.pod \
jv-convert.pod grmic.pod gcj-dbtool.pod gc-analyze.pod
gcj.pod: java/gcj.texi
-$(TEXI2POD) -D gcj < $< > $@
jcf-dump.pod: java/gcj.texi
-$(TEXI2POD) -D jcf-dump < $< > $@
gij.pod: java/gcj.texi
-$(TEXI2POD) -D gij < $< > $@
jv-convert.pod: java/gcj.texi
-$(TEXI2POD) -D jv-convert < $< > $@
grmic.pod: java/gcj.texi
-$(TEXI2POD) -D grmic < $< > $@
gcj-dbtool.pod: java/gcj.texi
-$(TEXI2POD) -D gcj-dbtool < $< > $@
gc-analyze.pod: java/gcj.texi
-$(TEXI2POD) -D gc-analyze < $< > $@
aot-compile.pod: java/gcj.texi
-$(TEXI2POD) -D aot-compile < $< > $@
rebuild-gcj-db.pod: java/gcj.texi
-$(TEXI2POD) -D rebuild-gcj-db < $< > $@
# Install the man pages.
java.install-man: installdirs \
$(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext) \
$(JAVA_TARGET_INDEPENDENT_BIN_TOOLS:%=doc/%.1) \
doc/gij.1 doc/jv-convert.1 doc/grmic.1 \
doc/gcj-dbtool.1 doc/gc-analyze.1 \
doc/aot-compile.1 doc/rebuild-gcj-db.1
for tool in $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS) \
gij jv-convert grmic gcj-dbtool gc-analyze aot-compile \
rebuild-gcj-db; do \
tool_transformed_name=`echo $$tool|sed '$(program_transform_name)'`; \
man_name=$(DESTDIR)$(man1dir)/$${tool_transformed_name}$(man1ext); \
rm -f $$man_name ; \
for source_name in doc/$${tool}.1 $(srcdir)/doc/$${tool}.1 ; do \
if test -f $$source_name; then \
$(INSTALL_DATA) $$source_name $$man_name; \
break; \
else : ; \
fi; \
done ; \
chmod a-x $$man_name ; \
done
$(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext): doc/gcj.1 installdirs
-rm -f $@
-$(INSTALL_DATA) $< $@
-chmod a-x $@

View File

@ -1,234 +0,0 @@
/* Functions related to the Boehm garbage collector.
Copyright (C) 2000-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
Java and all Java-based marks are trademarks or registered trademarks
of Sun Microsystems, Inc. in the United States and other countries.
The Free Software Foundation is independent of Sun Microsystems, Inc. */
/* Written by Tom Tromey <tromey@cygnus.com>. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "java-tree.h"
#include "parse.h"
static void mark_reference_fields (tree, wide_int *, unsigned int,
int *, int *, int *, HOST_WIDE_INT *);
/* A procedure-based object descriptor. We know that our
`kind' is 0, and `env' is likewise 0, so we have a simple
computation. From the GC sources:
(((((env) << LOG_MAX_MARK_PROCS) | (proc_index)) << DS_TAG_BITS) \
| DS_PROC)
Here DS_PROC == 2. */
#define PROCEDURE_OBJECT_DESCRIPTOR 2
/* Recursively mark reference fields. */
static void
mark_reference_fields (tree field,
wide_int *mask,
unsigned int ubit,
int *pointer_after_end,
int *all_bits_set,
int *last_set_index,
HOST_WIDE_INT *last_view_index)
{
/* See if we have fields from our superclass. */
if (DECL_NAME (field) == NULL_TREE)
{
mark_reference_fields (TYPE_FIELDS (TREE_TYPE (field)),
mask, ubit,
pointer_after_end, all_bits_set,
last_set_index, last_view_index);
field = DECL_CHAIN (field);
}
for (; field != NULL_TREE; field = DECL_CHAIN (field))
{
HOST_WIDE_INT offset;
HOST_WIDE_INT size_bytes;
if (FIELD_STATIC (field))
continue;
offset = int_byte_position (field);
size_bytes = int_size_in_bytes (TREE_TYPE (field));
if (JREFERENCE_TYPE_P (TREE_TYPE (field))
/* An `object' of type gnu.gcj.RawData is actually non-Java
data. */
&& TREE_TYPE (field) != rawdata_ptr_type_node)
{
unsigned int count;
unsigned int size_words;
unsigned int i;
/* If this reference slot appears to overlay a slot we think
we already covered, then we are doomed. */
gcc_assert (offset > *last_view_index);
if (offset % (HOST_WIDE_INT) (POINTER_SIZE / BITS_PER_UNIT))
{
*all_bits_set = -1;
*pointer_after_end = 1;
break;
}
count = offset * BITS_PER_UNIT / POINTER_SIZE;
size_words = size_bytes * BITS_PER_UNIT / POINTER_SIZE;
*last_set_index = count;
if (count >= ubit - 2)
*pointer_after_end = 1;
else
/* First word in object corresponds to most significant byte of
bitmap.
In the case of a multiple-word record, we set pointer
bits for all words in the record. This is conservative, but the
size_words != 1 case is impossible in regular java code. */
for (i = 0; i < size_words; ++i)
*mask = wi::set_bit (*mask, ubit - count - i - 1);
/* If we saw a non-reference field earlier, then we can't
use the count representation. We keep track of that in
*ALL_BITS_SET. */
if (! *all_bits_set)
*all_bits_set = -1;
}
else if (*all_bits_set > 0)
*all_bits_set = 0;
*last_view_index = offset;
}
}
/* Return the marking bitmap for the class TYPE. For now this is a
single word describing the type. */
tree
get_boehm_type_descriptor (tree type)
{
unsigned int count, log2_size, ubit;
int bit;
int all_bits_set = 1;
int last_set_index = 0;
HOST_WIDE_INT last_view_index = -1;
int pointer_after_end = 0;
tree field, value, value_type;
/* If the GC wasn't requested, just use a null pointer. */
if (! flag_use_boehm_gc)
return null_pointer_node;
value_type = java_type_for_mode (ptr_mode, 1);
wide_int mask = wi::zero (TYPE_PRECISION (value_type));
/* If we have a type of unknown size, use a proc. */
if (int_size_in_bytes (type) == -1)
goto procedure_object_descriptor;
bit = POINTER_SIZE / BITS_PER_UNIT;
/* The size of this node has to be known. And, we only support 32
and 64 bit targets, so we need to know that the log2 is one of
our values. */
log2_size = exact_log2 (bit);
if (bit == -1 || (log2_size != 2 && log2_size != 3))
{
/* This means the GC isn't supported. We should probably
abort or give an error. Instead, for now, we just silently
revert. FIXME. */
return null_pointer_node;
}
bit *= BITS_PER_UNIT;
/* Warning avoidance. */
ubit = (unsigned int) bit;
if (type == class_type_node)
goto procedure_object_descriptor;
field = TYPE_FIELDS (type);
mark_reference_fields (field, &mask, ubit,
&pointer_after_end, &all_bits_set,
&last_set_index, &last_view_index);
/* If the object is all pointers, or if the part with pointers fits
in our bitmap, then we are ok. Otherwise we have to allocate it
a different way. */
if (all_bits_set != -1 || (pointer_after_end && flag_reduced_reflection))
{
/* In this case the initial part of the object is all reference
fields, and the end of the object is all non-reference
fields. We represent the mark as a count of the fields,
shifted. In the GC the computation looks something like
this:
value = DS_LENGTH | WORDS_TO_BYTES (last_set_index + 1);
DS_LENGTH is 0.
WORDS_TO_BYTES shifts by log2(bytes-per-pointer).
In the case of flag_reduced_reflection and the bitmap would
overflow, we tell the gc that the object is all pointers so
that we don't have to emit reflection data for run time
marking. */
count = 0;
mask = wi::zero (TYPE_PRECISION (value_type));
++last_set_index;
while (last_set_index)
{
if ((last_set_index & 1))
mask = wi::set_bit (mask, log2_size + count);
last_set_index >>= 1;
++count;
}
value = wide_int_to_tree (value_type, mask);
}
else if (! pointer_after_end)
{
/* Bottom two bits for bitmap mark type are 01. */
mask = wi::set_bit (mask, 0);
value = wide_int_to_tree (value_type, mask);
}
else
{
procedure_object_descriptor:
value = build_int_cst (value_type, PROCEDURE_OBJECT_DESCRIPTOR);
}
return value;
}
/* The fourth (index of 3) element in the vtable is the GC descriptor.
A value of 2 indicates that the class uses _Jv_MarkObj. */
bool
uses_jv_markobj_p (tree dtable)
{
tree v;
/* FIXME: what do we return if !flag_use_boehm_gc ? */
gcc_assert (flag_use_boehm_gc);
/* FIXME: this is wrong if TARGET_VTABLE_USES_DESCRIPTORS. However,
this function is only used with flag_reduced_reflection. No
point in asserting unless we hit the bad case. */
gcc_assert (!flag_reduced_reflection || TARGET_VTABLE_USES_DESCRIPTORS == 0);
v = (*CONSTRUCTOR_ELTS (dtable))[3].value;
return (PROCEDURE_OBJECT_DESCRIPTOR == TREE_INT_CST_LOW (v));
}

View File

@ -1,662 +0,0 @@
/* Built-in and inline functions for gcj
Copyright (C) 2001-2016 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 3, 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.
.
.
Java and all Java-based marks are trademarks or registered trademarks
of Sun Microsystems, Inc. in the United States and other countries.
The Free Software Foundation is independent of Sun Microsystems, Inc. */
/* Written by Tom Tromey <tromey@redhat.com>. */
/* FIXME: Still need to include rtl.h here (see below). */
#undef IN_GCC_FRONTEND
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
#include "tree.h"
#include "stringpool.h"
#include "expmed.h"
#include "optabs.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "java-tree.h"
/* FIXME: All these headers are necessary for sync_compare_and_swap.
Front ends should never have to look at that. */
static tree max_builtin (tree, tree);
static tree min_builtin (tree, tree);
static tree abs_builtin (tree, tree);
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);
static tree VMSupportsCS8_builtin (tree, tree);
/* Functions of this type are used to inline a given call. Such a
function should either return an expression, if the call is to be
inlined, or NULL_TREE if a real call should be emitted. Arguments
are method return type and the original CALL_EXPR containing the
arguments to the call. */
typedef tree builtin_creator_function (tree, tree);
/* Hold a char*, before initialization, or a tree, after
initialization. */
union GTY(()) string_or_tree {
const char * GTY ((tag ("0"))) s;
tree GTY ((tag ("1"))) t;
};
/* Used to hold a single builtin record. */
struct GTY(()) builtin_record {
union string_or_tree GTY ((desc ("1"))) class_name;
union string_or_tree GTY ((desc ("1"))) method_name;
builtin_creator_function * GTY((skip)) creator;
enum built_in_function builtin_code;
};
static GTY(()) struct builtin_record java_builtins[] =
{
{ { "java.lang.Math" }, { "min" }, min_builtin, (enum built_in_function) 0 },
{ { "java.lang.Math" }, { "max" }, max_builtin, (enum built_in_function) 0 },
{ { "java.lang.Math" }, { "abs" }, abs_builtin, (enum built_in_function) 0 },
{ { "java.lang.Math" }, { "acos" }, NULL, BUILT_IN_ACOS },
{ { "java.lang.Math" }, { "asin" }, NULL, BUILT_IN_ASIN },
{ { "java.lang.Math" }, { "atan" }, NULL, BUILT_IN_ATAN },
{ { "java.lang.Math" }, { "atan2" }, NULL, BUILT_IN_ATAN2 },
{ { "java.lang.Math" }, { "ceil" }, NULL, BUILT_IN_CEIL },
{ { "java.lang.Math" }, { "cos" }, NULL, BUILT_IN_COS },
{ { "java.lang.Math" }, { "exp" }, NULL, BUILT_IN_EXP },
{ { "java.lang.Math" }, { "floor" }, NULL, BUILT_IN_FLOOR },
{ { "java.lang.Math" }, { "log" }, NULL, BUILT_IN_LOG },
{ { "java.lang.Math" }, { "pow" }, NULL, BUILT_IN_POW },
{ { "java.lang.Math" }, { "sin" }, NULL, BUILT_IN_SIN },
{ { "java.lang.Math" }, { "sqrt" }, NULL, BUILT_IN_SQRT },
{ { "java.lang.Math" }, { "tan" }, NULL, BUILT_IN_TAN },
{ { "java.lang.Integer" }, { "bitCount" }, NULL, BUILT_IN_POPCOUNT },
{ { "java.lang.Integer" }, { "reverseBytes" }, NULL, BUILT_IN_BSWAP32 },
{ { "java.lang.Long" }, { "bitCount" }, NULL, BUILT_IN_POPCOUNTL },
{ { "java.lang.Long" }, { "reverseBytes" }, NULL, BUILT_IN_BSWAP64 },
{ { "java.lang.Short" }, { "reverseBytes" }, NULL, BUILT_IN_BSWAP16 },
{ { "java.lang.Float" }, { "intBitsToFloat" }, convert_real,
(enum built_in_function) 0 },
{ { "java.lang.Double" }, { "longBitsToDouble" }, convert_real,
(enum built_in_function) 0 },
{ { "java.lang.Float" }, { "floatToRawIntBits" }, convert_real,
(enum built_in_function) 0 },
{ { "java.lang.Double" }, { "doubleToRawLongBits" }, convert_real,
(enum built_in_function) 0 },
{ { "sun.misc.Unsafe" }, { "putInt" }, putObject_builtin,
(enum built_in_function) 0},
{ { "sun.misc.Unsafe" }, { "putLong" }, putObject_builtin,
(enum built_in_function) 0},
{ { "sun.misc.Unsafe" }, { "putObject" }, putObject_builtin,
(enum built_in_function) 0},
{ { "sun.misc.Unsafe" }, { "compareAndSwapInt" },
compareAndSwapInt_builtin, (enum built_in_function) 0},
{ { "sun.misc.Unsafe" }, { "compareAndSwapLong" },
compareAndSwapLong_builtin, (enum built_in_function) 0},
{ { "sun.misc.Unsafe" }, { "compareAndSwapObject" },
compareAndSwapObject_builtin, (enum built_in_function) 0},
{ { "sun.misc.Unsafe" }, { "putOrderedInt" }, putVolatile_builtin,
(enum built_in_function) 0},
{ { "sun.misc.Unsafe" }, { "putOrderedLong" }, putVolatile_builtin,
(enum built_in_function) 0},
{ { "sun.misc.Unsafe" }, { "putOrderedObject" }, putVolatile_builtin,
(enum built_in_function) 0},
{ { "sun.misc.Unsafe" }, { "putIntVolatile" }, putVolatile_builtin,
(enum built_in_function) 0},
{ { "sun.misc.Unsafe" }, { "putLongVolatile" }, putVolatile_builtin,
(enum built_in_function) 0},
{ { "sun.misc.Unsafe" }, { "putObjectVolatile" }, putVolatile_builtin,
(enum built_in_function) 0},
{ { "sun.misc.Unsafe" }, { "getObjectVolatile" }, getVolatile_builtin,
(enum built_in_function) 0},
{ { "sun.misc.Unsafe" }, { "getIntVolatile" }, getVolatile_builtin,
(enum built_in_function) 0},
{ { "sun.misc.Unsafe" }, { "getLongVolatile" }, getVolatile_builtin, (enum built_in_function) 0},
{ { "sun.misc.Unsafe" }, { "getLong" }, getVolatile_builtin,
(enum built_in_function) 0},
{ { "java.util.concurrent.atomic.AtomicLong" }, { "VMSupportsCS8" },
VMSupportsCS8_builtin, (enum built_in_function) 0},
{ { NULL }, { NULL }, NULL, END_BUILTINS }
};
/* Internal functions which implement various builtin conversions. */
static tree
max_builtin (tree method_return_type, tree orig_call)
{
/* MAX_EXPR does not handle -0.0 in the Java style. */
if (TREE_CODE (method_return_type) == REAL_TYPE)
return NULL_TREE;
return fold_build2 (MAX_EXPR, method_return_type,
CALL_EXPR_ARG (orig_call, 0),
CALL_EXPR_ARG (orig_call, 1));
}
static tree
min_builtin (tree method_return_type, tree orig_call)
{
/* MIN_EXPR does not handle -0.0 in the Java style. */
if (TREE_CODE (method_return_type) == REAL_TYPE)
return NULL_TREE;
return fold_build2 (MIN_EXPR, method_return_type,
CALL_EXPR_ARG (orig_call, 0),
CALL_EXPR_ARG (orig_call, 1));
}
static tree
abs_builtin (tree method_return_type, tree orig_call)
{
return fold_build1 (ABS_EXPR, method_return_type,
CALL_EXPR_ARG (orig_call, 0));
}
/* Construct a new call to FN using the arguments from ORIG_CALL. */
static tree
java_build_function_call_expr (tree fn, tree orig_call)
{
int nargs = call_expr_nargs (orig_call);
switch (nargs)
{
/* Although we could handle the 0-3 argument cases using the general
logic in the default case, splitting them out permits folding to
be performed without constructing a temporary CALL_EXPR. */
case 0:
return build_call_expr (fn, 0);
case 1:
return build_call_expr (fn, 1, CALL_EXPR_ARG (orig_call, 0));
case 2:
return build_call_expr (fn, 2,
CALL_EXPR_ARG (orig_call, 0),
CALL_EXPR_ARG (orig_call, 1));
case 3:
return build_call_expr (fn, 3,
CALL_EXPR_ARG (orig_call, 0),
CALL_EXPR_ARG (orig_call, 1),
CALL_EXPR_ARG (orig_call, 2));
default:
{
tree fntype = TREE_TYPE (fn);
fn = build1 (ADDR_EXPR, build_pointer_type (fntype), fn);
return fold (build_call_array (TREE_TYPE (fntype),
fn, nargs, CALL_EXPR_ARGP (orig_call)));
}
}
}
static tree
convert_real (tree method_return_type, tree orig_call)
{
return build1 (VIEW_CONVERT_EXPR, method_return_type,
CALL_EXPR_ARG (orig_call, 0));
}
/* 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 CALL_EXPR 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_CALL) \
tree this_arg, obj_arg, offset_arg; \
do \
{ \
tree orig_method_call = METHOD_CALL; \
this_arg = CALL_EXPR_ARG (orig_method_call, 0); \
obj_arg = CALL_EXPR_ARG (orig_method_call, 1); \
offset_arg = fold_convert (java_type_for_size (POINTER_SIZE, 0), \
CALL_EXPR_ARG (orig_method_call, 2)); \
} \
while (0)
#define UNMARSHAL4(METHOD_CALL) \
tree value_type, this_arg, obj_arg, offset_arg, value_arg; \
do \
{ \
tree orig_method_call = METHOD_CALL; \
this_arg = CALL_EXPR_ARG (orig_method_call, 0); \
obj_arg = CALL_EXPR_ARG (orig_method_call, 1); \
offset_arg = fold_convert (java_type_for_size (POINTER_SIZE, 0), \
CALL_EXPR_ARG (orig_method_call, 2)); \
value_arg = CALL_EXPR_ARG (orig_method_call, 3); \
value_type = TREE_TYPE (value_arg); \
} \
while (0)
#define UNMARSHAL5(METHOD_CALL) \
tree value_type, this_arg, obj_arg, offset_arg, expected_arg, value_arg; \
do \
{ \
tree orig_method_call = METHOD_CALL; \
this_arg = CALL_EXPR_ARG (orig_method_call, 0); \
obj_arg = CALL_EXPR_ARG (orig_method_call, 1); \
offset_arg = fold_convert (java_type_for_size (POINTER_SIZE, 0), \
CALL_EXPR_ARG (orig_method_call, 2)); \
expected_arg = CALL_EXPR_ARG (orig_method_call, 3); \
value_arg = CALL_EXPR_ARG (orig_method_call, 4); \
value_type = TREE_TYPE (value_arg); \
} \
while (0)
/* 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_build_pointer_plus (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 orig_call)
{
tree addr, stmt;
UNMARSHAL4 (orig_call);
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 orig_call)
{
machine_mode mode = TYPE_MODE (int_type_node);
if (can_compare_and_swap_p (mode, flag_use_atomic_builtins))
{
tree addr, stmt;
enum built_in_function fncode = BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_4;
UNMARSHAL5 (orig_call);
(void) value_type; /* Avoid set but not used warning. */
addr = build_addr_sum (int_type_node, obj_arg, offset_arg);
stmt = build_call_expr (builtin_decl_explicit (fncode),
3, addr, expected_arg, value_arg);
return build_check_this (stmt, this_arg);
}
return NULL_TREE;
}
static tree
compareAndSwapLong_builtin (tree method_return_type ATTRIBUTE_UNUSED,
tree orig_call)
{
machine_mode mode = TYPE_MODE (long_type_node);
/* We don't trust flag_use_atomic_builtins for multi-word compareAndSwap.
Some machines such as ARM have atomic libfuncs but not the multi-word
versions. */
if (can_compare_and_swap_p (mode,
(flag_use_atomic_builtins
&& GET_MODE_SIZE (mode) <= UNITS_PER_WORD)))
{
tree addr, stmt;
enum built_in_function fncode = BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_8;
UNMARSHAL5 (orig_call);
(void) value_type; /* Avoid set but not used warning. */
addr = build_addr_sum (long_type_node, obj_arg, offset_arg);
stmt = build_call_expr (builtin_decl_explicit (fncode),
3, addr, expected_arg, value_arg);
return build_check_this (stmt, this_arg);
}
return NULL_TREE;
}
static tree
compareAndSwapObject_builtin (tree method_return_type ATTRIBUTE_UNUSED,
tree orig_call)
{
machine_mode mode = TYPE_MODE (ptr_type_node);
if (can_compare_and_swap_p (mode, flag_use_atomic_builtins))
{
tree addr, stmt;
enum built_in_function builtin;
UNMARSHAL5 (orig_call);
builtin = (POINTER_SIZE == 32
? BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_4
: BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_8);
addr = build_addr_sum (value_type, obj_arg, offset_arg);
stmt = build_call_expr (builtin_decl_explicit (builtin),
3, addr, expected_arg, value_arg);
return build_check_this (stmt, this_arg);
}
return NULL_TREE;
}
static tree
putVolatile_builtin (tree method_return_type ATTRIBUTE_UNUSED,
tree orig_call)
{
tree addr, stmt, modify_stmt;
UNMARSHAL4 (orig_call);
addr = build_addr_sum (value_type, obj_arg, offset_arg);
addr
= fold_convert (build_pointer_type (build_qualified_type
(value_type, TYPE_QUAL_VOLATILE)),
addr);
stmt = build_call_expr (builtin_decl_explicit (BUILT_IN_SYNC_SYNCHRONIZE), 0);
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 orig_call)
{
tree addr, stmt, modify_stmt, tmp;
UNMARSHAL3 (orig_call);
(void) this_arg; /* Avoid set but not used warning. */
addr = build_addr_sum (method_return_type, obj_arg, offset_arg);
addr
= fold_convert (build_pointer_type (build_qualified_type
(method_return_type,
TYPE_QUAL_VOLATILE)), addr);
stmt = build_call_expr (builtin_decl_explicit (BUILT_IN_SYNC_SYNCHRONIZE), 0);
tmp = build_decl (BUILTINS_LOCATION, 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;
}
static tree
VMSupportsCS8_builtin (tree method_return_type,
tree orig_call ATTRIBUTE_UNUSED)
{
machine_mode mode = TYPE_MODE (long_type_node);
gcc_assert (method_return_type == boolean_type_node);
if (can_compare_and_swap_p (mode, false))
return boolean_true_node;
else
return boolean_false_node;
}
/* Define a single builtin. */
static void
define_builtin (enum built_in_function val,
const char *name,
tree type,
const char *libname,
int flags)
{
tree decl;
decl = build_decl (BUILTINS_LOCATION,
FUNCTION_DECL, get_identifier (name), type);
DECL_EXTERNAL (decl) = 1;
TREE_PUBLIC (decl) = 1;
SET_DECL_ASSEMBLER_NAME (decl, get_identifier (libname));
pushdecl (decl);
DECL_BUILT_IN_CLASS (decl) = BUILT_IN_NORMAL;
DECL_FUNCTION_CODE (decl) = val;
set_call_expr_flags (decl, flags);
set_builtin_decl (val, decl, true);
}
/* Initialize the builtins. */
void
initialize_builtins (void)
{
tree double_ftype_double, double_ftype_double_double;
tree float_ftype_float_float;
tree boolean_ftype_boolean_boolean;
tree int_ftype_int;
int i;
for (i = 0; java_builtins[i].builtin_code != END_BUILTINS; ++i)
{
tree klass_id = get_identifier (java_builtins[i].class_name.s);
tree m = get_identifier (java_builtins[i].method_name.s);
java_builtins[i].class_name.t = klass_id;
java_builtins[i].method_name.t = m;
}
void_list_node = end_params_node;
float_ftype_float_float
= build_function_type_list (float_type_node,
float_type_node, float_type_node, NULL_TREE);
double_ftype_double
= build_function_type_list (double_type_node, double_type_node, NULL_TREE);
double_ftype_double_double
= build_function_type_list (double_type_node,
double_type_node, double_type_node, NULL_TREE);
define_builtin (BUILT_IN_FMOD, "__builtin_fmod",
double_ftype_double_double, "fmod", ECF_CONST | ECF_LEAF);
define_builtin (BUILT_IN_FMODF, "__builtin_fmodf",
float_ftype_float_float, "fmodf", ECF_CONST | ECF_LEAF);
define_builtin (BUILT_IN_ACOS, "__builtin_acos",
double_ftype_double, "_ZN4java4lang4Math4acosEJdd",
ECF_CONST | ECF_LEAF);
define_builtin (BUILT_IN_ASIN, "__builtin_asin",
double_ftype_double, "_ZN4java4lang4Math4asinEJdd",
ECF_CONST | ECF_LEAF);
define_builtin (BUILT_IN_ATAN, "__builtin_atan",
double_ftype_double, "_ZN4java4lang4Math4atanEJdd",
ECF_CONST | ECF_LEAF);
define_builtin (BUILT_IN_ATAN2, "__builtin_atan2",
double_ftype_double_double, "_ZN4java4lang4Math5atan2EJddd",
ECF_CONST | ECF_LEAF);
define_builtin (BUILT_IN_CEIL, "__builtin_ceil",
double_ftype_double, "_ZN4java4lang4Math4ceilEJdd",
ECF_CONST | ECF_LEAF);
define_builtin (BUILT_IN_COS, "__builtin_cos",
double_ftype_double, "_ZN4java4lang4Math3cosEJdd",
ECF_CONST | ECF_LEAF);
define_builtin (BUILT_IN_EXP, "__builtin_exp",
double_ftype_double, "_ZN4java4lang4Math3expEJdd",
ECF_CONST | ECF_LEAF);
define_builtin (BUILT_IN_FLOOR, "__builtin_floor",
double_ftype_double, "_ZN4java4lang4Math5floorEJdd",
ECF_CONST | ECF_LEAF);
define_builtin (BUILT_IN_LOG, "__builtin_log",
double_ftype_double, "_ZN4java4lang4Math3logEJdd",
ECF_CONST | ECF_LEAF);
define_builtin (BUILT_IN_POW, "__builtin_pow",
double_ftype_double_double, "_ZN4java4lang4Math3powEJddd",
ECF_CONST | ECF_LEAF);
define_builtin (BUILT_IN_SIN, "__builtin_sin",
double_ftype_double, "_ZN4java4lang4Math3sinEJdd",
ECF_CONST | ECF_LEAF);
define_builtin (BUILT_IN_SQRT, "__builtin_sqrt",
double_ftype_double, "_ZN4java4lang4Math4sqrtEJdd",
ECF_CONST | ECF_LEAF);
define_builtin (BUILT_IN_TAN, "__builtin_tan",
double_ftype_double, "_ZN4java4lang4Math3tanEJdd",
ECF_CONST | ECF_LEAF);
int_ftype_int = build_function_type_list (int_type_node,
int_type_node, NULL_TREE);
define_builtin (BUILT_IN_POPCOUNT, "__builtin_popcount", int_ftype_int,
"_ZN4java4lang7Integer8bitCountEJii",
ECF_CONST | ECF_LEAF | ECF_NOTHROW);
define_builtin (BUILT_IN_BSWAP32, "__builtin_bswap32", int_ftype_int,
"_ZN4java4lang7Integer12reverseBytesEJii",
ECF_CONST | ECF_LEAF | ECF_NOTHROW);
define_builtin (BUILT_IN_POPCOUNTL, "__builtin_popcountl",
build_function_type_list (int_type_node,
long_type_node, NULL_TREE),
"_ZN4java4lang4Long8bitCountEJix",
ECF_CONST | ECF_LEAF | ECF_NOTHROW);
define_builtin (BUILT_IN_BSWAP64, "__builtin_bswap64",
build_function_type_list (long_type_node,
long_type_node, NULL_TREE),
"_ZN4java4lang4Long12reverseBytesEJxx",
ECF_CONST | ECF_LEAF | ECF_NOTHROW);
define_builtin (BUILT_IN_BSWAP16, "__builtin_bswap16",
build_function_type_list (short_type_node,
short_type_node, NULL_TREE),
"_ZN4java4lang5Short12reverseBytesEJss",
ECF_CONST | ECF_LEAF | ECF_NOTHROW);
boolean_ftype_boolean_boolean
= build_function_type_list (boolean_type_node,
boolean_type_node, boolean_type_node,
NULL_TREE);
define_builtin (BUILT_IN_EXPECT, "__builtin_expect",
boolean_ftype_boolean_boolean,
"__builtin_expect",
ECF_CONST | ECF_NOTHROW);
define_builtin (BUILT_IN_SYNC_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", ECF_NOTHROW | ECF_LEAF);
define_builtin (BUILT_IN_SYNC_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", ECF_NOTHROW | ECF_LEAF);
define_builtin (BUILT_IN_SYNC_SYNCHRONIZE, "__sync_synchronize",
build_function_type_list (void_type_node, NULL_TREE),
"__sync_synchronize", ECF_NOTHROW | ECF_LEAF);
define_builtin (BUILT_IN_RETURN_ADDRESS, "__builtin_return_address",
build_function_type_list (ptr_type_node, int_type_node, NULL_TREE),
"__builtin_return_address", ECF_NOTHROW | ECF_LEAF);
define_builtin (BUILT_IN_TRAP, "__builtin_trap",
build_function_type_list (void_type_node, NULL_TREE),
"__builtin_trap", ECF_NOTHROW | ECF_LEAF | ECF_NORETURN);
build_common_builtin_nodes ();
}
/* If the call matches a builtin, return the
appropriate builtin expression instead. */
tree
check_for_builtin (tree method, tree call)
{
if (optimize && TREE_CODE (call) == CALL_EXPR)
{
int i;
tree method_class = DECL_NAME (TYPE_NAME (DECL_CONTEXT (method)));
tree method_name = DECL_NAME (method);
tree method_return_type = TREE_TYPE (TREE_TYPE (method));
for (i = 0; java_builtins[i].builtin_code != END_BUILTINS; ++i)
{
if (method_class == java_builtins[i].class_name.t
&& method_name == java_builtins[i].method_name.t)
{
tree fn;
if (java_builtins[i].creator != NULL)
{
tree result
= (*java_builtins[i].creator) (method_return_type, call);
return result == NULL_TREE ? call : result;
}
/* Builtin functions emit a direct call which is incompatible
with the BC-ABI. */
if (flag_indirect_dispatch)
return call;
fn = builtin_decl_explicit (java_builtins[i].builtin_code);
if (fn == NULL_TREE)
return call;
return java_build_function_call_expr (fn, call);
}
}
}
return call;
}
#include "gt-java-builtins.h"

File diff suppressed because it is too large Load Diff

View File

@ -1,40 +0,0 @@
# Top level configure fragment for the GNU compiler for the Java(TM)
# language.
# Copyright (C) 1994-2016 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 3, 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 COPYING3. If not see
#<http://www.gnu.org/licenses/>.
#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.
# Configure looks for the existence of this file to auto-config each language.
# We define several parameters used by configure:
#
# language - name of language as it would appear in $(LANGUAGES)
# compilers - value to add to $(COMPILERS)
language="java"
compilers="jc1\$(exeext) jvgenmain\$(exeext)"
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="fastjar"
#build_by_default=no
lang_requires=c++

View File

@ -1,614 +0,0 @@
/* Handle the constant pool of the Java(TM) Virtual Machine.
Copyright (C) 1997-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
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. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "stringpool.h"
#include "jcf.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "java-tree.h"
#include "toplev.h"
static void set_constant_entry (CPool *, int, int, jword);
static int find_tree_constant (CPool *, int, tree);
static int find_name_and_type_constant (CPool *, tree, tree);
static tree get_tag_node (int);
/* Set the INDEX'th constant in CPOOL to have the given TAG and VALUE. */
static void
set_constant_entry (CPool *cpool, int index, int tag, jword value)
{
if (cpool->data == NULL)
{
cpool->capacity = 100;
cpool->tags = ggc_cleared_vec_alloc<uint8> (cpool->capacity);
cpool->data = ggc_cleared_vec_alloc<cpool_entry> (cpool->capacity);
cpool->count = 1;
}
if (index >= cpool->capacity)
{
int old_cap = cpool->capacity;
cpool->capacity *= 2;
if (index >= cpool->capacity)
cpool->capacity = index + 10;
cpool->tags = GGC_RESIZEVEC (uint8, cpool->tags, cpool->capacity);
cpool->data = GGC_RESIZEVEC (union cpool_entry, cpool->data,
cpool->capacity);
/* Make sure GC never sees uninitialized tag values. */
memset (cpool->tags + old_cap, 0, cpool->capacity - old_cap);
memset (cpool->data + old_cap, 0,
(cpool->capacity - old_cap) * sizeof (union cpool_entry));
}
if (index >= cpool->count)
cpool->count = index + 1;
cpool->tags[index] = tag;
cpool->data[index].w = value;
}
/* Find (or create) a constant pool entry matching TAG and VALUE. */
int
find_constant1 (CPool *cpool, int tag, jword value)
{
int i;
for (i = cpool->count; --i > 0; )
{
if (cpool->tags[i] == tag && cpool->data[i].w == value)
return i;
}
i = cpool->count == 0 ? 1 : cpool->count;
set_constant_entry (cpool, i, tag, value);
return i;
}
/* Find a double-word constant pool entry matching TAG and WORD1/WORD2. */
int
find_constant2 (CPool *cpool, int tag, jword word1, jword word2)
{
int i;
for (i = cpool->count - 1; --i > 0; )
{
if (cpool->tags[i] == tag
&& cpool->data[i].w == word1
&& cpool->data[i+1].w == word2)
return i;
}
i = cpool->count == 0 ? 1 : cpool->count;
set_constant_entry (cpool, i, tag, word1);
set_constant_entry (cpool, i+1, 0, word2);
return i;
}
static int
find_tree_constant (CPool *cpool, int tag, tree value)
{
int i;
for (i = cpool->count; --i > 0; )
{
if (cpool->tags[i] == tag && cpool->data[i].t == value)
return i;
}
i = cpool->count == 0 ? 1 : cpool->count;
set_constant_entry (cpool, i, tag, 0);
cpool->data[i].t = value;
return i;
}
int
find_utf8_constant (CPool *cpool, tree name)
{
if (name == NULL_TREE)
return 0;
return find_tree_constant (cpool, CONSTANT_Utf8, name);
}
int
find_class_or_string_constant (CPool *cpool, int tag, tree name)
{
jword j = find_utf8_constant (cpool, name);
int i;
for (i = cpool->count; --i > 0; )
{
if (cpool->tags[i] == tag && cpool->data[i].w == j)
return i;
}
i = cpool->count;
set_constant_entry (cpool, i, tag, j);
return i;
}
int
find_class_constant (CPool *cpool, tree type)
{
return find_class_or_string_constant (cpool, CONSTANT_Class,
build_internal_class_name (type));
}
/* Allocate a CONSTANT_string entry given a STRING_CST. */
int
find_string_constant (CPool *cpool, tree string)
{
string = get_identifier (TREE_STRING_POINTER (string));
return find_class_or_string_constant (cpool, CONSTANT_String, string);
}
/* Find (or create) a CONSTANT_NameAndType matching NAME and TYPE.
Return its index in the constant pool CPOOL. */
static int
find_name_and_type_constant (CPool *cpool, tree name, tree type)
{
int name_index = find_utf8_constant (cpool, name);
int type_index = find_utf8_constant (cpool, build_java_signature (type));
return find_constant1 (cpool, CONSTANT_NameAndType,
(name_index << 16) | type_index);
}
/* Find (or create) a CONSTANT_Fieldref for DECL (a FIELD_DECL or VAR_DECL).
Return its index in the constant pool CPOOL. */
int
find_fieldref_index (CPool *cpool, tree decl)
{
int class_index = find_class_constant (cpool, DECL_CONTEXT (decl));
int name_type_index
= find_name_and_type_constant (cpool, DECL_NAME (decl), TREE_TYPE (decl));
return find_constant1 (cpool, CONSTANT_Fieldref,
(class_index << 16) | name_type_index);
}
/* Find (or create) a CONSTANT_Methodref for DECL (a FUNCTION_DECL).
Return its index in the constant pool CPOOL. */
int
find_methodref_index (CPool *cpool, tree decl)
{
return find_methodref_with_class_index (cpool, decl, DECL_CONTEXT (decl));
}
int
find_methodref_with_class_index (CPool *cpool, tree decl, tree mclass)
{
int class_index = find_class_constant (cpool, mclass);
tree name = DECL_CONSTRUCTOR_P (decl) ? init_identifier_node
: DECL_NAME (decl);
int name_type_index;
name_type_index =
find_name_and_type_constant (cpool, name, TREE_TYPE (decl));
return find_constant1 (cpool,
CLASS_INTERFACE (TYPE_NAME (mclass))
? CONSTANT_InterfaceMethodref
: CONSTANT_Methodref,
(class_index << 16) | name_type_index);
}
#define PUT1(X) (*ptr++ = (X))
#define PUT2(X) (PUT1((X) >> 8), PUT1(X))
#define PUT4(X) (PUT2((X) >> 16), PUT2(X))
#define PUTN(P, N) (memcpy(ptr, (P), (N)), ptr += (N))
/* Give the number of bytes needed in a .class file for the CPOOL
constant pool. Includes the 2-byte constant_pool_count. */
int
count_constant_pool_bytes (CPool *cpool)
{
int size = 2;
int i = 1;
for ( ; i < cpool->count; i++)
{
size++;
switch (cpool->tags[i])
{
case CONSTANT_NameAndType:
case CONSTANT_Fieldref:
case CONSTANT_Methodref:
case CONSTANT_InterfaceMethodref:
case CONSTANT_Float:
case CONSTANT_Integer:
size += 4;
break;
case CONSTANT_Class:
case CONSTANT_String:
size += 2;
break;
case CONSTANT_Long:
case CONSTANT_Double:
size += 8;
i++;
break;
case CONSTANT_Utf8:
{
tree t = cpool->data[i].t;
int len = IDENTIFIER_LENGTH (t);
size += len + 2;
}
break;
default:
/* Second word of CONSTANT_Long and CONSTANT_Double. */
size--;
}
}
return size;
}
/* Write the constant pool CPOOL into BUFFER.
The length of BUFFER is LENGTH, which must match the needed length. */
void
write_constant_pool (CPool *cpool, unsigned char *buffer, int length)
{
unsigned char *ptr = buffer;
int i = 1;
union cpool_entry *datap = &cpool->data[1];
PUT2 (cpool->count);
for ( ; i < cpool->count; i++, datap++)
{
int tag = cpool->tags[i];
PUT1 (tag);
switch (tag)
{
case CONSTANT_NameAndType:
case CONSTANT_Fieldref:
case CONSTANT_Methodref:
case CONSTANT_InterfaceMethodref:
case CONSTANT_Float:
case CONSTANT_Integer:
PUT4 (datap->w);
break;
case CONSTANT_Class:
case CONSTANT_String:
PUT2 (datap->w);
break;
break;
case CONSTANT_Long:
case CONSTANT_Double:
PUT4(datap->w);
i++;
datap++;
PUT4 (datap->w);
break;
case CONSTANT_Utf8:
{
tree t = datap->t;
int len = IDENTIFIER_LENGTH (t);
PUT2 (len);
PUTN (IDENTIFIER_POINTER (t), len);
}
break;
}
}
gcc_assert (ptr == buffer + length);
}
static GTY(()) tree tag_nodes[13];
static tree
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];
}
/* Given a class, return its constant pool, creating one if necessary. */
CPool *
cpool_for_class (tree klass)
{
CPool *cpool = TYPE_CPOOL (klass);
if (cpool == NULL)
{
cpool = ggc_cleared_alloc<CPool> ();
TYPE_CPOOL (klass) = cpool;
}
return cpool;
}
/* Look for a constant pool entry that matches TAG and NAME.
Creates a new entry if not found.
TAG is one of CONSTANT_Utf8, CONSTANT_String or CONSTANT_Class.
NAME is an IDENTIFIER_NODE naming the Utf8 constant, string, or class.
Returns the index of the entry. */
int
alloc_name_constant (int tag, tree name)
{
CPool *outgoing_cpool = cpool_for_class (output_class);
return find_tree_constant (outgoing_cpool, tag, name);
}
/* Create a constant pool entry for a name_and_type. This one has '.'
rather than '/' because it isn't going into a class file, it's
going into a compiled object. We don't use the '/' separator in
compiled objects. */
static int
find_name_and_type_constant_tree (CPool *cpool, tree name, tree type)
{
int name_index = find_utf8_constant (cpool, name);
int type_index
= find_utf8_constant (cpool,
identifier_subst (build_java_signature (type),
"", '/', '.', ""));
return find_constant1 (cpool, CONSTANT_NameAndType,
(name_index << 16) | type_index);
}
/* Look for a field ref that matches DECL in the constant pool of
KLASS.
Return the index of the entry. */
int
alloc_constant_fieldref (tree klass, tree decl)
{
CPool *outgoing_cpool = cpool_for_class (klass);
int class_index
= find_tree_constant (outgoing_cpool, CONSTANT_Class,
DECL_NAME (TYPE_NAME (DECL_CONTEXT (decl))));
int name_type_index
= find_name_and_type_constant_tree (outgoing_cpool, DECL_NAME (decl),
TREE_TYPE (decl));
return find_constant1 (outgoing_cpool, CONSTANT_Fieldref,
(class_index << 16) | name_type_index);
}
/* Build an identifier for the internal name of reference type TYPE. */
tree
build_internal_class_name (tree type)
{
tree name;
if (TYPE_ARRAY_P (type))
name = build_java_signature (type);
else
{
name = TYPE_NAME (type);
if (TREE_CODE (name) != IDENTIFIER_NODE)
name = DECL_NAME (name);
name = identifier_subst (name, "", '.', '/', "");
}
return name;
}
/* Look for a CONSTANT_Class entry for CLAS, creating a new one if needed. */
int
alloc_class_constant (tree clas)
{
tree class_name = build_internal_class_name (clas);
return alloc_name_constant (CONSTANT_Class,
(unmangle_classname
(IDENTIFIER_POINTER(class_name),
IDENTIFIER_LENGTH(class_name))));
}
/* Return the decl of the data array of the current constant pool. */
tree
build_constant_data_ref (bool indirect)
{
if (indirect)
{
tree d;
tree cpool_type = build_array_type (ptr_type_node, NULL_TREE);
tree decl = build_class_ref (output_class);
tree klass = build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (decl)),
decl);
tree constants = build3 (COMPONENT_REF,
TREE_TYPE (constants_field_decl_node), klass,
constants_field_decl_node,
NULL_TREE);
tree data = build3 (COMPONENT_REF,
TREE_TYPE (constants_data_field_decl_node),
constants,
constants_data_field_decl_node,
NULL_TREE);
TREE_THIS_NOTRAP (klass) = 1;
data = fold_convert (build_pointer_type (cpool_type), data);
d = build1 (INDIRECT_REF, cpool_type, data);
return d;
}
else
{
tree decl_name = mangled_classname ("_CD_", output_class);
tree decl = IDENTIFIER_GLOBAL_VALUE (decl_name);
if (! decl)
{
/* Build a type with unspecified bounds. The will make sure
that targets do the right thing with whatever size we end
up with at the end. Using bounds that are too small risks
assuming the data is in the small data section. */
tree type = build_array_type (ptr_type_node, NULL_TREE);
/* We need to lay out the type ourselves, since build_array_type
thinks the type is incomplete. */
layout_type (type);
decl = build_decl (input_location, VAR_DECL, decl_name, type);
TREE_STATIC (decl) = 1;
IDENTIFIER_GLOBAL_VALUE (decl_name) = decl;
}
return decl;
}
}
/* Get the pointer value at the INDEX'th element of the constant pool. */
tree
build_ref_from_constant_pool (int index)
{
tree i;
tree d = TYPE_CPOOL_DATA_REF (output_class);
if (d == NULL_TREE)
d = build_constant_data_ref (flag_indirect_classes);
i = build_int_cst (NULL_TREE, index);
d = build4 (ARRAY_REF, TREE_TYPE (TREE_TYPE (d)), d, i,
NULL_TREE, NULL_TREE);
return d;
}
/* Build an initializer for the constants field of the current constant pool.
Should only be called at top-level, since it may emit declarations. */
tree
build_constants_constructor (void)
{
CPool *outgoing_cpool = cpool_for_class (current_class);
tree tags_value, data_value;
tree cons;
vec<constructor_elt, va_gc> *v = NULL;
int i;
vec<constructor_elt, va_gc> *tags = NULL;
vec<constructor_elt, va_gc> *data = NULL;
constructor_elt *t = NULL;
constructor_elt *d = NULL;
if (outgoing_cpool->count > 0)
{
int c = outgoing_cpool->count;
vec_safe_grow_cleared (tags, c);
vec_safe_grow_cleared (data, c);
t = &(*tags)[c-1];
d = &(*data)[c-1];
}
#define CONSTRUCTOR_PREPEND_VALUE(E, V) E->value = V, E--
for (i = outgoing_cpool->count; --i > 0; )
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;
/* Make sure that on a big-endian machine with 64-bit
pointers this 32-bit jint appears in the first word.
FIXME: This is a kludge. The field we're initializing is
not a scalar but a union, and that's how we should
represent it in the compiler. We should fix this. */
if (BYTES_BIG_ENDIAN)
temp <<= ((POINTER_SIZE > 32) ? POINTER_SIZE - 32 : 0);
CONSTRUCTOR_PREPEND_VALUE (t, get_tag_node (outgoing_cpool->tags[i]));
CONSTRUCTOR_PREPEND_VALUE (d, build_int_cst (ptr_type_node, temp));
}
break;
case CONSTANT_Class:
case CONSTANT_String:
case CONSTANT_Unicode:
case CONSTANT_Utf8:
CONSTRUCTOR_PREPEND_VALUE (t, get_tag_node (outgoing_cpool->tags[i]));
CONSTRUCTOR_PREPEND_VALUE (d, build_utf8_ref (outgoing_cpool->data[i].t));
break;
default:
gcc_assert (false);
}
#undef CONSTRUCTOR_PREPEND_VALUE
if (outgoing_cpool->count > 0)
{
tree data_decl, tags_decl, tags_type;
tree max_index = build_int_cst (sizetype, outgoing_cpool->count - 1);
tree index_type = build_index_type (max_index);
tree tem;
/* Add dummy 0'th element of constant pool. */
gcc_assert (t == tags->address ());
gcc_assert (d == data->address ());
t->value = get_tag_node (0);
d->value = null_pointer_node;
/* Change the type of the decl to have the proper array size.
??? Make sure to transition the old type-pointer-to list to this
new type to not invalidate all build address expressions. */
data_decl = build_constant_data_ref (false);
tem = TYPE_POINTER_TO (TREE_TYPE (data_decl));
if (!tem)
tem = build_pointer_type (TREE_TYPE (data_decl));
TYPE_POINTER_TO (TREE_TYPE (data_decl)) = NULL_TREE;
TREE_TYPE (data_decl) = build_array_type (ptr_type_node, index_type);
TYPE_POINTER_TO (TREE_TYPE (data_decl)) = tem;
DECL_INITIAL (data_decl) = build_constructor (TREE_TYPE (data_decl), data);
DECL_SIZE (data_decl) = TYPE_SIZE (TREE_TYPE (data_decl));
DECL_SIZE_UNIT (data_decl) = TYPE_SIZE_UNIT (TREE_TYPE (data_decl));
rest_of_decl_compilation (data_decl, 1, 0);
data_value = build_address_of (data_decl);
tags_type = build_array_type (unsigned_byte_type_node, index_type);
tags_decl = build_decl (input_location,
VAR_DECL, mangled_classname ("_CT_",
current_class),
tags_type);
TREE_STATIC (tags_decl) = 1;
DECL_INITIAL (tags_decl) = build_constructor (tags_type, tags);
rest_of_decl_compilation (tags_decl, 1, 0);
tags_value = build_address_of (tags_decl);
}
else
{
data_value = null_pointer_node;
tags_value = null_pointer_node;
}
START_RECORD_CONSTRUCTOR (v, constants_type_node);
PUSH_FIELD_VALUE (v, "size",
build_int_cst (NULL_TREE, outgoing_cpool->count));
PUSH_FIELD_VALUE (v, "tags", tags_value);
PUSH_FIELD_VALUE (v, "data", data_value);
FINISH_RECORD_CONSTRUCTOR (cons, v, constants_type_node);
return cons;
}
#include "gt-java-constants.h"

File diff suppressed because it is too large Load Diff

View File

@ -1,608 +0,0 @@
/* Handle exceptions for GNU compiler for the Java(TM) language.
Copyright (C) 1997-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
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. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "stringpool.h"
#include "diagnostic-core.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "java-tree.h"
#include "java-except.h"
#include "toplev.h"
#include "tree-iterator.h"
static void expand_start_java_handler (struct eh_range *);
static struct eh_range *find_handler_in_range (int, struct eh_range *,
struct eh_range *);
static void check_start_handlers (struct eh_range *, int);
static void free_eh_ranges (struct eh_range *range);
struct eh_range *current_method_handlers;
struct eh_range *current_try_block = NULL;
/* These variables are used to speed up find_handler. */
static int cache_range_start, cache_range_end;
static struct eh_range *cache_range;
static struct eh_range *cache_next_child;
/* A dummy range that represents the entire method. */
struct eh_range whole_range;
/* Check the invariants of the structure we're using to contain
exception regions. Either returns true or fails an assertion
check. */
bool
sanity_check_exception_range (struct eh_range *range)
{
struct eh_range *ptr = range->first_child;
for (; ptr; ptr = ptr->next_sibling)
{
gcc_assert (ptr->outer == range
&& ptr->end_pc > ptr->start_pc);
if (ptr->next_sibling)
gcc_assert (ptr->next_sibling->start_pc >= ptr->end_pc);
gcc_assert (ptr->start_pc >= ptr->outer->start_pc
&& ptr->end_pc <= ptr->outer->end_pc);
(void) sanity_check_exception_range (ptr);
}
return true;
}
#if defined(DEBUG_JAVA_BINDING_LEVELS)
extern int is_class_level;
extern int current_pc;
extern int binding_depth;
extern void indent (void);
static void
print_ranges (struct eh_range *range)
{
if (! range)
return;
struct eh_range *child = range->first_child;
indent ();
fprintf (stderr, "handler pc %d --> %d ", range->start_pc, range->end_pc);
tree handler = range->handlers;
for ( ; handler != NULL_TREE; handler = TREE_CHAIN (handler))
{
tree type = TREE_PURPOSE (handler);
if (type == NULL)
type = throwable_type_node;
fprintf (stderr, " type=%s ", IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))));
}
fprintf (stderr, "\n");
int saved = binding_depth;
binding_depth++;
print_ranges (child);
binding_depth = saved;
print_ranges (range->next_sibling);
}
#endif
/* Search for the most specific eh_range containing PC.
Assume PC is within RANGE.
CHILD is a list of children of RANGE such that any
previous children have end_pc values that are too low. */
static struct eh_range *
find_handler_in_range (int pc, struct eh_range *range, struct eh_range *child)
{
for (; child != NULL; child = child->next_sibling)
{
if (pc < child->start_pc)
break;
if (pc < child->end_pc)
return find_handler_in_range (pc, child, child->first_child);
}
cache_range = range;
cache_range_start = pc;
cache_next_child = child;
cache_range_end = child == NULL ? range->end_pc : child->start_pc;
return range;
}
/* Find the inner-most handler that contains PC. */
struct eh_range *
find_handler (int pc)
{
struct eh_range *h;
if (pc >= cache_range_start)
{
h = cache_range;
if (pc < cache_range_end)
return h;
while (pc >= h->end_pc)
{
cache_next_child = h->next_sibling;
h = h->outer;
}
}
else
{
h = &whole_range;
cache_next_child = h->first_child;
}
return find_handler_in_range (pc, h, cache_next_child);
}
static void
free_eh_ranges (struct eh_range *range)
{
while (range)
{
struct eh_range *next = range->next_sibling;
free_eh_ranges (range->first_child);
if (range != &whole_range)
free (range);
range = next;
}
}
/* Called to re-initialize the exception machinery for a new method. */
void
method_init_exceptions (void)
{
free_eh_ranges (&whole_range);
whole_range.start_pc = 0;
whole_range.end_pc = DECL_CODE_LENGTH (current_function_decl) + 1;
whole_range.outer = NULL;
whole_range.first_child = NULL;
whole_range.next_sibling = NULL;
cache_range_start = 0xFFFFFF;
}
/* Split an exception range into two at PC. The sub-ranges that
belong to the range are split and distributed between the two new
ranges. */
static void
split_range (struct eh_range *range, int pc)
{
struct eh_range *ptr;
struct eh_range **first_child, **second_child;
struct eh_range *h;
/* First, split all the sub-ranges. */
for (ptr = range->first_child; ptr; ptr = ptr->next_sibling)
{
if (pc > ptr->start_pc
&& pc < ptr->end_pc)
{
split_range (ptr, pc);
}
}
/* Create a new range. */
h = XNEW (struct eh_range);
h->start_pc = pc;
h->end_pc = range->end_pc;
h->next_sibling = range->next_sibling;
range->next_sibling = h;
range->end_pc = pc;
h->handlers = build_tree_list (TREE_PURPOSE (range->handlers),
TREE_VALUE (range->handlers));
h->next_sibling = NULL;
h->expanded = 0;
h->stmt = NULL;
h->outer = range->outer;
h->first_child = NULL;
ptr = range->first_child;
first_child = &range->first_child;
second_child = &h->first_child;
/* Distribute the sub-ranges between the two new ranges. */
for (ptr = range->first_child; ptr; ptr = ptr->next_sibling)
{
if (ptr->start_pc < pc)
{
*first_child = ptr;
ptr->outer = range;
first_child = &ptr->next_sibling;
}
else
{
*second_child = ptr;
ptr->outer = h;
second_child = &ptr->next_sibling;
}
}
*first_child = NULL;
*second_child = NULL;
}
/* Add an exception range.
There are some missed optimization opportunities here. For
example, some bytecode obfuscators generate seemingly
nonoverlapping exception ranges which, when coalesced, do in fact
nest correctly. We could merge these, but we'd have to fix up all
the enclosed regions first and perhaps create a new range anyway if
it overlapped existing ranges.
Also, we don't attempt to detect the case where two previously
added disjoint ranges could be coalesced by a new range. */
void
add_handler (int start_pc, int end_pc, tree handler, tree type)
{
struct eh_range *ptr, *h;
struct eh_range **first_child, **prev;
/* First, split all the existing ranges that we need to enclose. */
for (ptr = whole_range.first_child; ptr; ptr = ptr->next_sibling)
{
if (start_pc > ptr->start_pc
&& start_pc < ptr->end_pc)
{
split_range (ptr, start_pc);
}
if (end_pc > ptr->start_pc
&& end_pc < ptr->end_pc)
{
split_range (ptr, end_pc);
}
if (ptr->start_pc >= end_pc)
break;
}
/* Create the new range. */
h = XNEW (struct eh_range);
first_child = &h->first_child;
h->start_pc = start_pc;
h->end_pc = end_pc;
h->first_child = NULL;
h->outer = NULL_EH_RANGE;
h->handlers = build_tree_list (type, handler);
h->next_sibling = NULL;
h->expanded = 0;
h->stmt = NULL;
/* Find every range at the top level that will be a sub-range of the
range we're inserting and make it so. */
{
struct eh_range **prev = &whole_range.first_child;
for (ptr = *prev; ptr;)
{
struct eh_range *next = ptr->next_sibling;
if (ptr->start_pc >= end_pc)
break;
if (ptr->start_pc < start_pc)
{
prev = &ptr->next_sibling;
}
else if (ptr->start_pc >= start_pc
&& ptr->start_pc < end_pc)
{
*prev = next;
*first_child = ptr;
first_child = &ptr->next_sibling;
ptr->outer = h;
ptr->next_sibling = NULL;
}
ptr = next;
}
}
/* Find the right place to insert the new range. */
prev = &whole_range.first_child;
for (ptr = *prev; ptr; prev = &ptr->next_sibling, ptr = ptr->next_sibling)
{
gcc_assert (ptr->outer == NULL_EH_RANGE);
if (ptr->start_pc >= start_pc)
break;
}
/* And insert it there. */
*prev = h;
if (ptr)
{
h->next_sibling = ptr;
h->outer = ptr->outer;
}
}
/* if there are any handlers for this range, issue start of region */
static void
expand_start_java_handler (struct eh_range *range)
{
#if defined(DEBUG_JAVA_BINDING_LEVELS)
indent ();
fprintf (stderr, "expand start handler pc %d --> %d\n",
current_pc, range->end_pc);
#endif /* defined(DEBUG_JAVA_BINDING_LEVELS) */
pushlevel (0);
register_exception_range (range, range->start_pc, range->end_pc);
range->expanded = 1;
}
tree
prepare_eh_table_type (tree type)
{
tree exp;
tree *slot;
const char *name;
char *buf;
tree decl;
tree utf8_ref;
/* The "type" (match_info) in a (Java) exception table is a pointer to:
* a) NULL - meaning match any type in a try-finally.
* b) a pointer to a pointer to a class.
* c) a pointer to a pointer to a utf8_ref. The pointer is
* rewritten to point to the appropriate class. */
if (type == NULL_TREE)
return NULL_TREE;
if (TYPE_TO_RUNTIME_MAP (output_class) == NULL)
TYPE_TO_RUNTIME_MAP (output_class) = java_treetreehash_create (10);
slot = java_treetreehash_new (TYPE_TO_RUNTIME_MAP (output_class), type);
if (*slot != NULL)
return TREE_VALUE (*slot);
if (is_compiled_class (type) && !flag_indirect_dispatch)
{
name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)));
buf = (char *) alloca (strlen (name) + 5);
sprintf (buf, "%s_ref", name);
decl = build_decl (input_location,
VAR_DECL, get_identifier (buf), ptr_type_node);
TREE_STATIC (decl) = 1;
DECL_ARTIFICIAL (decl) = 1;
DECL_IGNORED_P (decl) = 1;
TREE_READONLY (decl) = 1;
TREE_THIS_VOLATILE (decl) = 0;
DECL_INITIAL (decl) = build_class_ref (type);
layout_decl (decl, 0);
pushdecl (decl);
exp = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (decl)), decl);
}
else
{
utf8_ref = build_utf8_ref (DECL_NAME (TYPE_NAME (type)));
name = IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (utf8_ref, 0)));
buf = (char *) alloca (strlen (name) + 5);
sprintf (buf, "%s_ref", name);
decl = build_decl (input_location,
VAR_DECL, get_identifier (buf), utf8const_ptr_type);
TREE_STATIC (decl) = 1;
DECL_ARTIFICIAL (decl) = 1;
DECL_IGNORED_P (decl) = 1;
TREE_READONLY (decl) = 1;
TREE_THIS_VOLATILE (decl) = 0;
layout_decl (decl, 0);
pushdecl (decl);
exp = build1 (ADDR_EXPR, build_pointer_type (utf8const_ptr_type), decl);
CONSTRUCTOR_APPEND_ELT (TYPE_CATCH_CLASSES (output_class),
NULL_TREE,
make_catch_class_record (exp, utf8_ref));
}
exp = convert (ptr_type_node, exp);
*slot = tree_cons (type, exp, NULL_TREE);
return exp;
}
int
expand_catch_class (treetreehash_entry **entry, int)
{
struct treetreehash_entry *ite = *entry;
tree addr = TREE_VALUE ((tree)ite->value);
tree decl;
STRIP_NOPS (addr);
decl = TREE_OPERAND (addr, 0);
rest_of_decl_compilation (decl, global_bindings_p (), 0);
return true;
}
/* For every class in the TYPE_TO_RUNTIME_MAP, expand the
corresponding object that is used by the runtime type matcher. */
void
java_expand_catch_classes (tree this_class)
{
if (TYPE_TO_RUNTIME_MAP (this_class))
TYPE_TO_RUNTIME_MAP (this_class)->traverse<int, expand_catch_class> (0);
}
/* Build and push the variable that will hold the exception object
within this function. */
static tree
build_exception_object_var (void)
{
tree decl = DECL_FUNCTION_EXC_OBJ (current_function_decl);
if (decl == NULL)
{
decl = build_decl (DECL_SOURCE_LOCATION (current_function_decl),
VAR_DECL, get_identifier ("#exc_obj"), ptr_type_node);
DECL_IGNORED_P (decl) = 1;
DECL_ARTIFICIAL (decl) = 1;
DECL_FUNCTION_EXC_OBJ (current_function_decl) = decl;
pushdecl_function_level (decl);
}
return decl;
}
/* Build a reference to the jthrowable object being carried in the
exception header. */
tree
build_exception_object_ref (tree type)
{
tree obj;
/* Java only passes object via pointer and doesn't require adjusting.
The java object is immediately before the generic exception header. */
obj = build_exception_object_var ();
obj = fold_convert (build_pointer_type (type), obj);
obj = fold_build_pointer_plus (obj,
fold_build1 (NEGATE_EXPR, sizetype,
TYPE_SIZE_UNIT (TREE_TYPE (obj))));
obj = build1 (INDIRECT_REF, type, obj);
return obj;
}
/* If there are any handlers for this range, issue end of range,
and then all handler blocks */
void
expand_end_java_handler (struct eh_range *range)
{
tree handler = range->handlers;
if (handler)
{
tree exc_obj = build_exception_object_var ();
tree catches = make_node (STATEMENT_LIST);
tree_stmt_iterator catches_i = tsi_last (catches);
tree *body;
for (; handler; handler = TREE_CHAIN (handler))
{
tree type, eh_type, x;
tree stmts = make_node (STATEMENT_LIST);
tree_stmt_iterator stmts_i = tsi_last (stmts);
type = TREE_PURPOSE (handler);
if (type == NULL)
type = throwable_type_node;
eh_type = prepare_eh_table_type (type);
x = build_call_expr (builtin_decl_explicit (BUILT_IN_EH_POINTER),
1, integer_zero_node);
x = build2 (MODIFY_EXPR, void_type_node, exc_obj, x);
tsi_link_after (&stmts_i, x, TSI_CONTINUE_LINKING);
x = build1 (GOTO_EXPR, void_type_node, TREE_VALUE (handler));
tsi_link_after (&stmts_i, x, TSI_CONTINUE_LINKING);
x = build2 (CATCH_EXPR, void_type_node, eh_type, stmts);
tsi_link_after (&catches_i, x, TSI_CONTINUE_LINKING);
/* Throwable can match anything in Java, and therefore
any subsequent handlers are unreachable. */
/* ??? If we're assured of no foreign language exceptions,
we'd be better off using NULL as the exception type
for the catch. */
if (type == throwable_type_node)
break;
}
body = get_stmts ();
*body = build2 (TRY_CATCH_EXPR, void_type_node, *body, catches);
}
#if defined(DEBUG_JAVA_BINDING_LEVELS)
indent ();
fprintf (stderr, "expand end handler pc %d <-- %d\n",
current_pc, range->start_pc);
#endif /* defined(DEBUG_JAVA_BINDING_LEVELS) */
}
/* Recursive helper routine for maybe_start_handlers. */
static void
check_start_handlers (struct eh_range *range, int pc)
{
if (range != NULL_EH_RANGE && range->start_pc == pc)
{
check_start_handlers (range->outer, pc);
if (!range->expanded)
expand_start_java_handler (range);
}
}
/* Routine to see if exception handling is turned on.
DO_WARN is nonzero if we want to inform the user that exception
handling is turned off.
This is used to ensure that -fexceptions has been specified if the
compiler tries to use any exception-specific functions. */
static inline int
doing_eh (void)
{
if (! flag_exceptions)
{
static int warned = 0;
if (! warned)
{
error ("exception handling disabled, use -fexceptions to enable");
warned = 1;
}
return 0;
}
return 1;
}
static struct eh_range *current_range;
/* Emit any start-of-try-range starting at start_pc and ending after
end_pc. */
void
maybe_start_try (int start_pc, int end_pc)
{
struct eh_range *range;
if (! doing_eh ())
return;
range = find_handler (start_pc);
while (range != NULL_EH_RANGE && range->start_pc == start_pc
&& range->end_pc < end_pc)
range = range->outer;
current_range = range;
check_start_handlers (range, start_pc);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,67 +0,0 @@
/* Definitions for exception handling for use by the GNU compiler
for the Java(TM) language compiler.
Copyright (C) 1997-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
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 eh_range
{
/* The (byte-code PC) range of the handled block. */
int start_pc;
int end_pc;
/* A list of handlers. For each element in the list,
the TREE_PURPOSE is the handled class (NULL_EXPR for a finally block),
and the TREE_VALUE is the LABEL_DECL of the handler. */
tree handlers;
/* Surrounding handler, if any. */
struct eh_range *outer;
/* The first child range. It is nested inside this range
(i.e. this.start_pc <= first_child.end_pc
&& this.end_pc >= first_child.end_pc).
The children are linked together using next_sibling, and are sorted
by increasing start_pc and end_pc (we do not support non-nested
overlapping ranges). */
struct eh_range *first_child;
/* The next child of outer, in address order. */
struct eh_range *next_sibling;
/* True if this range has already been expanded. */
int expanded;
/* The TRY_CATCH_EXPR for this EH range. */
tree stmt;
};
/* A dummy range that represents the entire method. */
extern struct eh_range whole_range;
#define NULL_EH_RANGE (&whole_range)
extern struct eh_range * find_handler (int);
extern void method_init_exceptions (void);
extern void maybe_start_try (int, int);
extern void add_handler (int, int, tree, tree);
extern void expand_end_java_handler (struct eh_range *);
extern bool sanity_check_exception_range (struct eh_range *);

View File

@ -1,172 +0,0 @@
/* Java(TM) language-specific gimplification routines.
Copyright (C) 2003-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
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. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "function.h"
#include "basic-block.h"
#include "tree.h"
#include "gimple.h"
#include "java-tree.h"
#include "dumpfile.h"
#include "gimplify.h"
static tree java_gimplify_block (tree);
static enum gimplify_status java_gimplify_modify_expr (tree *);
static enum gimplify_status java_gimplify_self_mod_expr (tree *, gimple_seq *,
gimple_seq *);
static void dump_java_tree (enum tree_dump_index, tree);
/* Convert a Java tree to GENERIC. */
void
java_genericize (tree fndecl)
{
walk_tree (&DECL_SAVED_TREE (fndecl), java_replace_references, NULL, NULL);
dump_java_tree (TDI_original, fndecl);
}
/* Gimplify a Java tree. */
int
java_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
{
enum tree_code code = TREE_CODE (*expr_p);
switch (code)
{
case BLOCK:
*expr_p = java_gimplify_block (*expr_p);
break;
case MODIFY_EXPR:
return java_gimplify_modify_expr (expr_p);
case POSTINCREMENT_EXPR:
case POSTDECREMENT_EXPR:
case PREINCREMENT_EXPR:
case PREDECREMENT_EXPR:
return java_gimplify_self_mod_expr (expr_p, pre_p, post_p);
/* These should already be lowered before we get here. */
case URSHIFT_EXPR:
case COMPARE_EXPR:
case COMPARE_L_EXPR:
case COMPARE_G_EXPR:
gcc_unreachable ();
default:
return GS_UNHANDLED;
}
return GS_OK;
}
static enum gimplify_status
java_gimplify_modify_expr (tree *modify_expr_p)
{
tree modify_expr = *modify_expr_p;
tree lhs = TREE_OPERAND (modify_expr, 0);
tree rhs = TREE_OPERAND (modify_expr, 1);
tree lhs_type = TREE_TYPE (lhs);
if (lhs_type != TREE_TYPE (rhs))
/* Fix up type mismatches to make legal GIMPLE. These are
generated in several places, in particular null pointer
assignment and subclass assignment. */
TREE_OPERAND (modify_expr, 1) = convert (lhs_type, rhs);
return GS_UNHANDLED;
}
/* Special case handling for volatiles: we need to generate a barrier
between the reading and the writing. */
static enum gimplify_status
java_gimplify_self_mod_expr (tree *expr_p, gimple_seq *pre_p ATTRIBUTE_UNUSED,
gimple_seq *post_p ATTRIBUTE_UNUSED)
{
tree lhs = TREE_OPERAND (*expr_p, 0);
if (TREE_CODE (lhs) == COMPONENT_REF
&& TREE_THIS_VOLATILE (TREE_OPERAND (lhs, 1)))
TREE_THIS_VOLATILE (lhs) = 1;
return GS_UNHANDLED;
}
/* Gimplify BLOCK into a BIND_EXPR. */
static tree
java_gimplify_block (tree java_block)
{
tree decls = BLOCK_VARS (java_block);
tree body = BLOCK_EXPR_BODY (java_block);
gbind *outer = gimple_current_bind_expr ();
tree block;
/* Don't bother with empty blocks. */
if (! body)
return build_empty_stmt (input_location);
if (IS_EMPTY_STMT (body))
return body;
/* Make a proper block. Java blocks are unsuitable for BIND_EXPR
because they use BLOCK_SUBBLOCKS for another purpose. */
block = make_node (BLOCK);
BLOCK_VARS (block) = decls;
/* The TREE_USED flag on a block determines whether the debug output
routines generate info for the variables in that block. */
TREE_USED (block) = 1;
if (outer != NULL)
{
tree b = gimple_bind_block (outer);
BLOCK_SUBBLOCKS (b) = chainon (BLOCK_SUBBLOCKS (b), block);
}
BLOCK_EXPR_BODY (java_block) = NULL_TREE;
return build3 (BIND_EXPR, TREE_TYPE (java_block), decls, body, block);
}
/* Dump a tree of some kind. This is a convenience wrapper for the
dump_* functions in tree-dump.c. */
static void
dump_java_tree (enum tree_dump_index phase, tree t)
{
FILE *stream;
int flags;
stream = dump_begin (phase, &flags);
flags |= TDF_SLIM;
if (stream)
{
dump_node (t, flags, stream);
dump_end (phase, stream);
}
}

View File

@ -1,6 +0,0 @@
enum java_opcode {
#define JAVAOP(NAME, CODE, KIND, TYPE, VALUE) OPCODE_##NAME = CODE,
#include "javaop.def"
#undef JAVAOP
LAST_AND_UNUSED_JAVA_OPCODE
};

View File

@ -1,38 +0,0 @@
/* This file contains the definitions and documentation for the
extra tree codes used by gcj.
Copyright (C) 1996-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>. */
/* Shift right, logical. */
DEFTREECODE (URSHIFT_EXPR, "urshift_expr", tcc_binary, 2)
/* Return -1, 0, 1 depending on whether the first argument is
less, equal, or greater to the second argument. */
DEFTREECODE (COMPARE_EXPR, "compare_expr", tcc_binary, 2)
/* Same as COMPARE_EXPR, but if either value is NaN, the result is -1. */
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)
/*
Local variables:
mode:c
End:
*/

File diff suppressed because it is too large Load Diff

View File

@ -1,314 +0,0 @@
/* Table of opcodes for byte codes defined by the Java(TM) virtual
machine specification.
Copyright (C) 1998-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
Java and all Java-based marks are trademarks or registered trademarks
of Sun Microsystems, Inc. in the United States and other countries.
The Free Software Foundation is independent of Sun Microsystems, Inc.
Written by Per Bothner <bothner@cygnus.com>, February 1996.
*/
/* JAVAOP (OPNAME, OPCODE, OPKIND, OPERAND_TYPE, OPERAND_VALUE), where:
OPNAME is the name of the opcode.
OPCODE is the 1-byte opcode value.
OPKIND is the kind of operation.
OPERAND_TYPE is the type operands affected.
OPERAND_VALUE tells where to get the value. (Its meaning
depends on OPKIND.) */
/* Various macro used in OPERAND_VALUE:
IMMEDIATE_s1: An immediate signed 1-byte value in the byte-code stream.
IMMEDIATE_s2: An immediate signed 2-byte value in the byte-code stream.
IMMEDIATE_u1: An immediate unsigned 1-byte value in the byte-code stream.
IMMEDIATE_u2: An immediate unsigned 2-byte value in the byte-code stream.
CONST_INDEX_1: An immediate unsigned 1-byte index into the constant pool.
CONST_INDEX_2: An immediate unsigned 2-byte index into the constant pool.
*/
/* More specifically, this is the meaning of the various OPKINDs:
BINOP: binary operation
OPERAND_TYPE is the argument type.
OPERAND_VALUE is PLUS, MINUS, MULT, TRUNC_DIV, RDIV, REM,
LSHIFT, RSHIFT, URSHIFT, BIT_AND, BIT_IOR, BIT_XOR,
COMPARE, COMPARE_L, or COMPARE_G.
UNOP: unary operation
OPERAND_TYPE is the argument type.
OPERAND_VALUE is NEG.
INVOKE: invoke operations
OPERAND_TYPE is VIRTUAL, SPECIAL, STATIC, or INTERFACE.
OPERAND_VALUE is 1 if interface, 0 otherwise.
OBJECT: new, checkcast, instanceof
OPERAND_TYPE is PTR.
OPERAND_VALUE is NEW, CHECKCAST, or INSTANCEOF.
BRANCH: branch operations
OPERAND_TYPE is GOTO, CALL, or RETURN.
OPERAND_VALUE is IMMEDIATE_s2, VAR_INDEX_1, IMMEDIATE_s4,
or VAR_INDEX_2.
STACK: Various stack operations.
PUSHC: Push a constant onto the operand stack.
OPERAND_VALUE maybe be the value to push,
or IMMEDIATE_s1 or IMMEDIATE_s2 if the constant is immediate,
or CONST_INDEX_1 or CONST_INDEX_2 for a constant pool index.
LOAD: Push a value from a local variable onto the operand stack.
OPERAND_VALUE is the index of the local variable in the current
Java frame. It can be a literal, or IMMEDIATE_i2.
CONVERT: Convert top of stack value from one type to another.
OPERAND_TYPE is the argument type.
OPERAND_VALUE is the result type.
TEST: Compares an integer (popped from the stack) against zero.
If the test (in OPERAND_VALUE) is true, goto a relative
offset given by the next two bytes.
COND: Compares two values (popped from the stack) against each other.
If the test (in OPERAND_VALUE) is true, goto a relative
offset given by the next two bytes.
SWITCH:
OPERAND_VALUE is either TABLE or LOOKUP.
ARRAY:
OPERAND_VALUE is LOAD, STORE, LENGTH, or NEW.
FIELD: Extracts from or stores into a field.
OPERAND_TYPE is 1 for a static field, 0 for a regular field.
OPERAND_VALUE is 1 for a put operation, 0 for a get operation.
SPECIAL:
Random bunch of opcodes.
*/
JAVAOP (nop, 0, STACK, POP, 0)
JAVAOP (aconst_null, 1, PUSHC, PTR, 0)
JAVAOP (iconst_m1, 2, PUSHC, INT, -1)
JAVAOP (iconst_0, 3, PUSHC, INT, 0)
JAVAOP (iconst_1, 4, PUSHC, INT, 1)
JAVAOP (iconst_2, 5, PUSHC, INT, 2)
JAVAOP (iconst_3, 6, PUSHC, INT, 3)
JAVAOP (iconst_4, 7, PUSHC, INT, 4)
JAVAOP (iconst_5, 8, PUSHC, INT, 5)
JAVAOP (lconst_0, 9, PUSHC, LONG, 0)
JAVAOP (lconst_1, 10, PUSHC, LONG, 1)
JAVAOP (fconst_0, 11, PUSHC, FLOAT, 0)
JAVAOP (fconst_1, 12, PUSHC, FLOAT, 1)
JAVAOP (fconst_2, 13, PUSHC, FLOAT, 2)
JAVAOP (dconst_0, 14, PUSHC, DOUBLE, 0)
JAVAOP (dconst_1, 15, PUSHC, DOUBLE, 1)
JAVAOP (bipush, 16, PUSHC, INT, IMMEDIATE_s1)
JAVAOP (sipush, 17, PUSHC, INT, IMMEDIATE_s2)
JAVAOP (ldc, 18, PUSHC, INT, CONST_INDEX_1)
JAVAOP (ldc_w, 19, PUSHC, INT, CONST_INDEX_2)
JAVAOP (ldc2_w, 20, PUSHC, LONG, CONST_INDEX_2)
JAVAOP (iload, 21, LOAD, INT, IMMEDIATE_u1)
JAVAOP (lload, 22, LOAD, LONG, IMMEDIATE_u1)
JAVAOP (fload, 23, LOAD, FLOAT, IMMEDIATE_u1)
JAVAOP (dload, 24, LOAD, DOUBLE, IMMEDIATE_u1)
JAVAOP (aload, 25, LOAD, PTR, IMMEDIATE_u1)
JAVAOP (iload_0, 26, LOAD, INT, 0)
JAVAOP (iload_1, 27, LOAD, INT, 1)
JAVAOP (iload_2, 28, LOAD, INT, 2)
JAVAOP (iload_3, 29, LOAD, INT, 3)
JAVAOP (lload_0, 30, LOAD, LONG, 0)
JAVAOP (lload_1, 31, LOAD, LONG, 1)
JAVAOP (lload_2, 32, LOAD, LONG, 2)
JAVAOP (lload_3, 33, LOAD, LONG, 3)
JAVAOP (fload_0, 34, LOAD, FLOAT, 0)
JAVAOP (fload_1, 35, LOAD, FLOAT, 1)
JAVAOP (fload_2, 36, LOAD, FLOAT, 2)
JAVAOP (fload_3, 37, LOAD, FLOAT, 3)
JAVAOP (dload_0, 38, LOAD, DOUBLE, 0)
JAVAOP (dload_1, 39, LOAD, DOUBLE, 1)
JAVAOP (dload_2, 40, LOAD, DOUBLE, 2)
JAVAOP (dload_3, 41, LOAD, DOUBLE, 3)
JAVAOP (aload_0, 42, LOAD, PTR, 0)
JAVAOP (aload_1, 43, LOAD, PTR, 1)
JAVAOP (aload_2, 44, LOAD, PTR, 2)
JAVAOP (aload_3, 45, LOAD, PTR, 3)
JAVAOP (iaload, 46, ARRAY, INT, LOAD)
JAVAOP (laload, 47, ARRAY, LONG, LOAD)
JAVAOP (faload, 48, ARRAY, FLOAT, LOAD)
JAVAOP (daload, 49, ARRAY, DOUBLE, LOAD)
JAVAOP (aaload, 50, ARRAY, PTR, LOAD)
JAVAOP (baload, 51, ARRAY, BYTE, LOAD)
JAVAOP (caload, 52, ARRAY, CHAR, LOAD)
JAVAOP (saload, 53, ARRAY, SHORT, LOAD)
JAVAOP (istore, 54, STORE, INT, IMMEDIATE_u1)
JAVAOP (lstore, 55, STORE, LONG, IMMEDIATE_u1)
JAVAOP (fstore, 56, STORE, FLOAT, IMMEDIATE_u1)
JAVAOP (dstore, 57, STORE, DOUBLE, IMMEDIATE_u1)
JAVAOP (astore, 58, STORE, PTR, IMMEDIATE_u1)
JAVAOP (istore_0, 59, STORE, INT, 0)
JAVAOP (istore_1, 60, STORE, INT, 1)
JAVAOP (istore_2, 61, STORE, INT, 2)
JAVAOP (istore_3, 62, STORE, INT, 3)
JAVAOP (lstore_0, 63, STORE, LONG, 0)
JAVAOP (lstore_1, 64, STORE, LONG, 1)
JAVAOP (lstore_2, 65, STORE, LONG, 2)
JAVAOP (lstore_3, 66, STORE, LONG, 3)
JAVAOP (fstore_0, 67, STORE, FLOAT, 0)
JAVAOP (fstore_1, 68, STORE, FLOAT, 1)
JAVAOP (fstore_2, 69, STORE, FLOAT, 2)
JAVAOP (fstore_3, 70, STORE, FLOAT, 3)
JAVAOP (dstore_0, 71, STORE, DOUBLE, 0)
JAVAOP (dstore_1, 72, STORE, DOUBLE, 1)
JAVAOP (dstore_2, 73, STORE, DOUBLE, 2)
JAVAOP (dstore_3, 74, STORE, DOUBLE, 3)
JAVAOP (astore_0, 75, STORE, PTR, 0)
JAVAOP (astore_1, 76, STORE, PTR, 1)
JAVAOP (astore_2, 77, STORE, PTR, 2)
JAVAOP (astore_3, 78, STORE, PTR, 3)
JAVAOP (iastore, 79, ARRAY, INT, STORE)
JAVAOP (lastore, 80, ARRAY, LONG, STORE)
JAVAOP (fastore, 81, ARRAY, FLOAT, STORE)
JAVAOP (dastore, 82, ARRAY, DOUBLE, STORE)
JAVAOP (aastore, 83, ARRAY, PTR, STORE)
JAVAOP (bastore, 84, ARRAY, BYTE, STORE)
JAVAOP (castore, 85, ARRAY, CHAR, STORE)
JAVAOP (sastore, 86, ARRAY, SHORT, STORE)
JAVAOP (pop, 87, STACK, POP, 1)
JAVAOP (pop2, 88, STACK, POP, 2)
JAVAOP (dup, 89, STACK, DUP, 1)
JAVAOP (dup_x1, 90, STACK, DUPx1, 1)
JAVAOP (dup_x2, 91, STACK, DUPx2, 1)
JAVAOP (dup2, 92, STACK, DUP, 2)
JAVAOP (dup2_x1, 93, STACK, DUPx1, 2)
JAVAOP (dup2_x2, 94, STACK, DUPx2, 2)
JAVAOP (swap, 95, STACK, SWAP, 0)
JAVAOP (iadd, 96, BINOP, INT, PLUS)
JAVAOP (ladd, 97, BINOP, LONG, PLUS)
JAVAOP (fadd, 98, BINOP, FLOAT, PLUS)
JAVAOP (dadd, 99, BINOP, DOUBLE, PLUS)
JAVAOP (isub, 100, BINOP, INT, MINUS)
JAVAOP (lsub, 101, BINOP, LONG, MINUS)
JAVAOP (fsub, 102, BINOP, FLOAT, MINUS)
JAVAOP (dsub, 103, BINOP, DOUBLE, MINUS)
JAVAOP (imul, 104, BINOP, INT, MULT)
JAVAOP (lmul, 105, BINOP, LONG, MULT)
JAVAOP (fmul, 106, BINOP, FLOAT, MULT)
JAVAOP (dmul, 107, BINOP, DOUBLE, MULT)
JAVAOP (idiv, 108, BINOP, INT, TRUNC_DIV)
JAVAOP (ldiv, 109, BINOP, LONG, TRUNC_DIV)
JAVAOP (fdiv, 110, BINOP, FLOAT, RDIV)
JAVAOP (ddiv, 111, BINOP, DOUBLE, RDIV)
JAVAOP (irem, 112, BINOP, INT, REM)
JAVAOP (lrem, 113, BINOP, LONG, REM)
JAVAOP (frem, 114, BINOP, FLOAT, REM)
JAVAOP (drem, 115, BINOP, DOUBLE, REM)
JAVAOP (ineg, 116, UNOP, INT, NEG)
JAVAOP (lneg, 117, UNOP, LONG, NEG)
JAVAOP (fneg, 118, UNOP, FLOAT, NEG)
JAVAOP (dneg, 119, UNOP, DOUBLE, NEG)
JAVAOP (ishl, 120, BINOP, INT, LSHIFT)
JAVAOP (lshl, 121, BINOP, LONG, LSHIFT)
JAVAOP (ishr, 122, BINOP, INT, RSHIFT)
JAVAOP (lshr, 123, BINOP, LONG, RSHIFT)
JAVAOP (iushr, 124, BINOP, INT, URSHIFT)
JAVAOP (lushr, 125, BINOP, LONG, URSHIFT)
JAVAOP (iand, 126, BINOP, INT, BIT_AND)
JAVAOP (land, 127, BINOP, LONG, BIT_AND)
JAVAOP (ior, 128, BINOP, INT, BIT_IOR)
JAVAOP (lor, 129, BINOP, LONG, BIT_IOR)
JAVAOP (ixor, 130, BINOP, INT, BIT_XOR)
JAVAOP (lxor, 131, BINOP, LONG, BIT_XOR)
JAVAOP (iinc, 132, SPECIAL, INT, IINC)
JAVAOP (i2l, 133, CONVERT, INT, LONG)
JAVAOP (i2f, 134, CONVERT, INT, FLOAT)
JAVAOP (i2d, 135, CONVERT, INT, DOUBLE)
JAVAOP (l2i, 136, CONVERT, LONG, INT)
JAVAOP (l2f, 137, CONVERT, LONG, FLOAT)
JAVAOP (l2d, 138, CONVERT, LONG, DOUBLE)
JAVAOP (f2i, 139, CONVERT, FLOAT, INT)
JAVAOP (f2l, 140, CONVERT, FLOAT, LONG)
JAVAOP (f2d, 141, CONVERT, FLOAT, DOUBLE)
JAVAOP (d2i, 142, CONVERT, DOUBLE, INT)
JAVAOP (d2l, 143, CONVERT, DOUBLE, LONG)
JAVAOP (d2f, 144, CONVERT, DOUBLE, FLOAT)
JAVAOP (i2b, 145, CONVERT2, INT, BYTE)
JAVAOP (i2c, 146, CONVERT2, INT, CHAR)
JAVAOP (i2s, 147, CONVERT2, INT, SHORT)
JAVAOP (lcmp, 148, BINOP, LONG, COMPARE)
JAVAOP (fcmpl, 149, BINOP, FLOAT, COMPARE_L)
JAVAOP (fcmpg, 150, BINOP, FLOAT, COMPARE_G)
JAVAOP (dcmpl, 151, BINOP, DOUBLE, COMPARE_L)
JAVAOP (dcmpg, 152, BINOP, DOUBLE, COMPARE_G)
JAVAOP (ifeq, 153, TEST, INT, EQ)
JAVAOP (ifne, 154, TEST, INT, NE)
JAVAOP (iflt, 155, TEST, INT, LT)
JAVAOP (ifge, 156, TEST, INT, GE)
JAVAOP (ifgt, 157, TEST, INT, GT)
JAVAOP (ifle, 158, TEST, INT, LE)
JAVAOP (if_icmpeq, 159, COND, INT, EQ)
JAVAOP (if_icmpne, 160, COND, INT, NE)
JAVAOP (if_icmplt, 161, COND, INT, LT)
JAVAOP (if_icmpge, 162, COND, INT, GE)
JAVAOP (if_icmpgt, 163, COND, INT, GT)
JAVAOP (if_icmple, 164, COND, INT, LE)
JAVAOP (if_acmpeq, 165, COND, PTR, EQ)
JAVAOP (if_acmpne, 166, COND, PTR, NE)
JAVAOP (goto, 167, BRANCH, GOTO, IMMEDIATE_s2)
JAVAOP (jsr, 168, JSR, CALL, IMMEDIATE_s2)
JAVAOP (ret, 169, RET, RETURN, VAR_INDEX_1)
JAVAOP (tableswitch, 170, SWITCH, INT, TABLE)
JAVAOP (lookupswitch, 171, SWITCH, INT, LOOKUP)
JAVAOP (ireturn, 172, RETURN, INT, 0)
JAVAOP (lreturn, 173, RETURN, LONG, 0)
JAVAOP (freturn, 174, RETURN, FLOAT, 0)
JAVAOP (dreturn, 175, RETURN, DOUBLE, 0)
JAVAOP (areturn, 176, RETURN, PTR, 0)
JAVAOP (return, 177, RETURN, VOID, 0)
JAVAOP (getstatic, 178, FIELD, 1, 0)
JAVAOP (putstatic, 179, FIELD, 1, 1)
JAVAOP (getfield, 180, FIELD, 0, 0)
JAVAOP (putfield, 181, FIELD, 0, 1)
JAVAOP (invokevirtual, 182, INVOKE, VIRTUAL,0)
JAVAOP (invokespecial, 183, INVOKE, SPECIAL, 0)
JAVAOP (invokestatic, 184, INVOKE, STATIC, 0)
JAVAOP (invokeinterface,185, INVOKE, INTERFACE, 1)
JAVAOP (invokedynamic, 186, INVOKE, DYNAMIC, 1)
JAVAOP (new, 187, OBJECT, PTR, NEW)
JAVAOP (newarray, 188, ARRAY, NUM, NEW)
JAVAOP (anewarray, 189, ARRAY, PTR, NEW)
JAVAOP (arraylength, 190, ARRAY, INT, LENGTH)
JAVAOP (athrow, 191, SPECIAL, ANY, THROW)
JAVAOP (checkcast, 192, OBJECT, PTR, CHECKCAST)
JAVAOP (instanceof, 193, OBJECT, PTR, INSTANCEOF)
JAVAOP (monitorenter, 194, SPECIAL, MONITOR, ENTER)
JAVAOP (monitorexit, 195, SPECIAL, MONITOR, EXIT)
JAVAOP (wide, 196, SPECIAL, ANY, WIDE)
JAVAOP (multianewarray,197, ARRAY, MULTI, NEW)
JAVAOP (ifnull, 198, TEST, PTR, EQ)
JAVAOP (ifnonnull, 199, TEST, PTR, NE)
JAVAOP (goto_w, 200, BRANCH, GOTO, IMMEDIATE_s4)
JAVAOP (jsr_w, 201, JSR, CALL, IMMEDIATE_s4)
JAVAOP (breakpoint, 202, SPECIAL, ANY, BREAK)
JAVAOP (ret_w, 209, RET, RETURN, VAR_INDEX_2)
JAVAOP (impdep1, 254, IMPL, ANY, 1)
JAVAOP (impdep2, 255, IMPL, ANY, 2)

View File

@ -1,190 +0,0 @@
/* Utility macros to handle Java(TM) byte codes.
Copyright (C) 1996-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
Java and all Java-based marks are trademarks or registered trademarks
of Sun Microsystems, Inc. in the United States and other countries.
The Free Software Foundation is independent of Sun Microsystems, Inc. */
/* Written by Per Bothner <bothner@cygnus.com>, February 1996. */
#ifndef GCC_JAVAOP_H
#define GCC_JAVAOP_H
typedef unsigned char uint8;
#ifndef int16
#if __SHRT_MAX__ == 32767
#define int16 short
#elif __INT_MAX__ == 32767
#define int16 int
#elif __LONG_MAX__ == 32767
#define int16 long
#else
#define int16 short
#endif
#endif
typedef unsigned int16 uint16;
#ifndef int32
#if __INT_MAX__ == 2147483647
#define int32 int
#elif __LONG_MAX__ == 2147483647
#define int32 long
#elif __SHRT_MAX__ == 2147483647
#define int32 short
#else
#define int32 int
#endif
#endif
typedef unsigned int32 uint32;
/* A signed 64-bit (or more) integral type, suitable for Java's 'long'. */
#ifndef int64
#if __LONG_MAX__ == 9223372036854775807LL
#define int64 long
#elif __LONG_LONG_MAX__ == 9223372036854775807LL
#define int64 long long
#else
#define int64 long long
#endif
#endif
/* An unsigned 64-bit (or more) integral type, same length as int64. */
#ifndef uint64
#define uint64 unsigned int64
#endif
typedef uint16 jchar;
typedef signed char jbyte;
typedef int16 jshort;
typedef int32 jint;
typedef int64 jlong;
typedef void* jref;
/* A 32-bit big-endian IEEE single-precision float. */
typedef struct _jfloat {
unsigned int negative : 1;
unsigned int exponent : 8;
unsigned int mantissa : 23;
} jfloat;
#define JFLOAT_FINITE(f) ((f).exponent != 0xFF)
#define JFLOAT_QNAN_MASK 0x400000
#define JFLOAT_EXP_BIAS 0x7f
/* A 32-bit big-endian IEEE double-precision float. */
typedef struct _jdouble {
unsigned int negative : 1;
unsigned int exponent : 11;
unsigned int mantissa0: 20;
unsigned int mantissa1: 32;
} jdouble;
#define JDOUBLE_FINITE(f) ((f).exponent != 0x7FF)
#define JDOUBLE_QNAN_MASK 0x80000 /* apply to mantissa0 */
#define JDOUBLE_EXP_BIAS 0x3ff
/* A jword is an unsigned integral type big enough for a 32-bit jint
or jfloat *or* a pointer. It is the type appropriate for stack
locations and local variables in a Java interpreter. */
#ifndef jword
#if defined (__LP64__) || defined (__alpha__) || defined (__MMIX__) \
|| (defined (_ARCH_PPC) && defined (__64BIT__)) \
|| defined (__powerpc64__) || defined (__s390x__) || defined (__x86_64__) \
|| defined (__sparcv9) || (defined (__sparc__) && defined (__arch64__))
#define jword uint64
#else
#define jword uint32
#endif
#endif
#ifndef IMMEDIATE_u1
#define IMMEDIATE_u1 (PC++, CHECK_PC_IN_RANGE(PC), BCODE[PC-1])
#endif
#ifndef IMMEDIATE_s1
#define IMMEDIATE_s1 (PC++, CHECK_PC_IN_RANGE(PC), (signed char)BCODE[PC-1])
#endif
#ifndef IMMEDIATE_s2
#define IMMEDIATE_s2 (PC+=2, CHECK_PC_IN_RANGE(PC), \
(signed char) BCODE[PC-2] * 256 + BCODE[PC-1])
#endif
#ifndef IMMEDIATE_u2
#define IMMEDIATE_u2 (PC+=2, CHECK_PC_IN_RANGE(PC),\
(BCODE[PC-2] * 256 + BCODE[PC-1]))
#endif
#ifndef IMMEDIATE_s4
#define IMMEDIATE_s4 (PC+=4, CHECK_PC_IN_RANGE(PC), \
(WORD_TO_INT((BCODE[PC-4] << 24) | (BCODE[PC-3] << 16) \
| (BCODE[PC-2] << 8) | (BCODE[PC-1]))))
#endif
static inline jfloat
WORD_TO_FLOAT(jword w)
{
jfloat f;
f.negative = (w & 0x80000000) >> 31;
f.exponent = (w & 0x7f800000) >> 23;
f.mantissa = (w & 0x007fffff);
return f;
}
/* Sign extend w. If the host on which this cross-compiler runs uses
a 64-bit type for jword the appropriate sign extension is
performed; if it's a 32-bit type the arithmetic does nothing but is
harmless. */
static inline jint
WORD_TO_INT(jword w)
{
jint n = w & 0xffffffff; /* Mask lower 32 bits. */
n ^= (jint)1 << 31;
n -= (uint32)1 << 31; /* Sign extend lower 32 bits to upper. */
return n;
}
static inline jlong
WORDS_TO_LONG(jword hi, jword lo)
{
return ((jlong) hi << 32) | ((jlong)lo & (((jlong)1 << 32) -1));
}
static inline jdouble
WORDS_TO_DOUBLE(jword hi, jword lo)
{
jdouble d;
d.negative = (hi & 0x80000000) >> 31;
d.exponent = (hi & 0x7ff00000) >> 20;
d.mantissa0 = (hi & 0x000fffff);
d.mantissa1 = lo;
return d;
}
/* If PREFIX_CHAR is the first character of the Utf8 encoding of a character,
return the number of bytes taken by the encoding.
Return -1 for a continuation character. */
#define UT8_CHAR_LENGTH(PREFIX_CHAR) \
((unsigned char)(PREFIX_CHAR) < 128 ? 1 \
: ((PREFIX_CHAR) & 0x40) == 0 ? -1 \
: ((PREFIX_CHAR) & 0x20) == 0 ? 2 \
: ((PREFIX_CHAR) & 0x10) == 0 ? 3 \
: ((PREFIX_CHAR) & 0x08) == 0 ? 4 : 5)
#endif /* ! GCC_JAVAOP_H */

View File

@ -1,140 +0,0 @@
/* Functions for handling dependency tracking when reading .class files.
Copyright (C) 1998-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
Java and all Java-based marks are trademarks or registered trademarks
of Sun Microsystems, Inc. in the United States and other countries.
The Free Software Foundation is independent of Sun Microsystems, Inc. */
/* Written by Tom Tromey <tromey@cygnus.com>, October 1998. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "mkdeps.h"
#include "jcf.h"
/* The dependency structure used for this invocation. */
struct deps *dependencies;
/* The output file, or NULL if we aren't doing dependency tracking. */
static FILE *dep_out = NULL;
/* Nonzero if system files should be added. */
static int system_files;
/* Nonzero if we are dumping out dummy dependencies. */
static int print_dummies;
/* Call this to reset the dependency module. This is required if
multiple dependency files are being generated from a single tool
invocation. FIXME: we should change our API or just completely use
the one in mkdeps.h. */
void
jcf_dependency_reset (void)
{
if (dep_out != NULL)
{
if (dep_out != stdout)
fclose (dep_out);
dep_out = NULL;
}
if (dependencies != NULL)
{
deps_free (dependencies);
dependencies = NULL;
}
}
void
jcf_dependency_set_target (const char *name)
{
/* We just handle this the same as an `add_target'. */
if (dependencies != NULL && name != NULL)
deps_add_target (dependencies, name, 1);
}
void
jcf_dependency_add_target (const char *name)
{
if (dependencies != NULL)
deps_add_target (dependencies, name, 1);
}
void
jcf_dependency_set_dep_file (const char *name)
{
gcc_assert (dep_out != stdout);
if (dep_out)
fclose (dep_out);
if (! strcmp (name, "-"))
dep_out = stdout;
else
dep_out = fopen (name, "w");
}
void
jcf_dependency_add_file (const char *filename ATTRIBUTE_UNUSED, int system_p)
{
if (! dependencies)
return;
/* Just omit system files. */
if (system_p && ! system_files)
return;
/* FIXME: Don't emit any dependencies. In many cases we'll just see
temporary files emitted by ecj... */
/* deps_add_dep (dependencies, filename); */
}
void
jcf_dependency_init (int system_p)
{
gcc_assert (! dependencies);
system_files = system_p;
dependencies = deps_init ();
}
void
jcf_dependency_print_dummies (void)
{
print_dummies = 1;
}
void
jcf_dependency_write (void)
{
if (! dep_out)
return;
gcc_assert (dependencies);
deps_write (dependencies, dep_out, 72);
if (print_dummies)
deps_phony_targets (dependencies, dep_out);
fflush (dep_out);
}

File diff suppressed because it is too large Load Diff

View File

@ -1,566 +0,0 @@
/* Utility routines for finding and reading Java(TM) .class files.
Copyright (C) 1996-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
Java and all Java-based marks are trademarks or registered trademarks
of Sun Microsystems, Inc. in the United States and other countries.
The Free Software Foundation is independent of Sun Microsystems, Inc. */
/* Written by Per Bothner <bothner@cygnus.com>, February 1996. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "jcf.h"
#include <dirent.h>
#include "zlib.h"
int
jcf_unexpected_eof (JCF *jcf, int count ATTRIBUTE_UNUSED)
{
if (jcf->filename)
fprintf (stderr, "Premature end of .class file %s.\n", jcf->filename);
else
fprintf (stderr, "Premature end of .class file <stdin>.\n");
exit (-1);
}
void
jcf_trim_old_input (JCF *jcf)
{
int count = jcf->read_ptr - jcf->buffer;
if (count > 0)
{
memmove (jcf->buffer, jcf->read_ptr, jcf->read_end - jcf->read_ptr);
jcf->read_ptr -= count;
jcf->read_end -= count;
}
}
int
jcf_filbuf_from_stdio (JCF *jcf, int count)
{
FILE *file = (FILE*) (jcf->read_state);
if (count > jcf->buffer_end - jcf->read_ptr)
{
JCF_u4 old_read_ptr = jcf->read_ptr - jcf->buffer;
JCF_u4 old_read_end = jcf->read_end - jcf->buffer;
JCF_u4 old_size = jcf->buffer_end - jcf->buffer;
JCF_u4 new_size = (old_size == 0 ? 2000 : 2 * old_size) + count;
unsigned char *new_buffer
= jcf->buffer == NULL ? XNEWVAR (unsigned char, new_size)
: XRESIZEVAR (unsigned char, jcf->buffer, new_size);
jcf->buffer = new_buffer;
jcf->buffer_end = new_buffer + new_size;
jcf->read_ptr = new_buffer + old_read_ptr;
jcf->read_end = new_buffer + old_read_end;
}
count -= jcf->read_end - jcf->read_ptr;
if (count <= 0)
return 0;
if ((int) fread (jcf->read_end, 1, count, file) != count)
jcf_unexpected_eof (jcf, count);
jcf->read_end += count;
return 0;
}
#include "zipfile.h"
struct ZipFile *SeenZipFiles = NULL;
/* Open a zip file with the given name, and cache directory and file
descriptor. If the file is missing, treat it as an empty archive.
Return NULL if the .zip file is malformed.
*/
ZipFile *
opendir_in_zip (const char *zipfile, int is_system)
{
struct ZipFile* zipf;
char magic [4];
int fd;
for (zipf = SeenZipFiles; zipf != NULL; zipf = zipf->next)
{
if (strcmp (zipf->name, zipfile) == 0)
return zipf;
}
zipf = XNEWVAR (struct ZipFile, sizeof (struct ZipFile) + strlen (zipfile) + 1);
zipf->next = SeenZipFiles;
zipf->name = (char*)(zipf+1);
strcpy (zipf->name, zipfile);
fd = open (zipfile, O_RDONLY | O_BINARY);
zipf->fd = fd;
if (fd < 0)
{
/* A missing zip file is not considered an error.
We may want to re-consider that. FIXME. */
zipf->count = 0;
zipf->dir_size = 0;
zipf->central_directory = NULL;
}
else
{
jcf_dependency_add_file (zipfile, is_system);
if (read (fd, magic, 4) != 4 || GET_u4 (magic) != (JCF_u4)ZIPMAGIC)
{
free (zipf);
close (fd);
return NULL;
}
lseek (fd, 0L, SEEK_SET);
if (read_zip_archive (zipf) != 0)
{
free (zipf);
close (fd);
return NULL;
}
}
SeenZipFiles = zipf;
return zipf;
}
/* Returns:
0: OK - zipmember found.
-1: Not found.
-2: Malformed archive.
*/
int
open_in_zip (JCF *jcf, const char *zipfile, const char *zipmember,
int is_system)
{
ZipDirectory *zipd;
int i, len;
ZipFile *zipf = opendir_in_zip (zipfile, is_system);
if (zipf == NULL)
return -2;
if (!zipmember)
return 0;
len = strlen (zipmember);
zipd = (struct ZipDirectory*) zipf->central_directory;
for (i = 0; i < zipf->count; i++, zipd = ZIPDIR_NEXT (zipd))
{
if (len == zipd->filename_length &&
strncmp (ZIPDIR_FILENAME (zipd), zipmember, len) == 0)
{
JCF_ZERO (jcf);
jcf->filename = xstrdup (zipfile);
jcf->classname = xstrdup (zipmember);
return read_zip_member(jcf, zipd, zipf);
}
}
return -1;
}
/* Read data from zip archive member. */
int
read_zip_member (JCF *jcf, ZipDirectory *zipd, ZipFile *zipf)
{
jcf->filbuf = jcf_unexpected_eof;
jcf->zipd = zipd;
if (zipd->compression_method == Z_NO_COMPRESSION)
{
jcf->buffer = XNEWVEC (unsigned char, zipd->size);
jcf->buffer_end = jcf->buffer + zipd->size;
jcf->read_ptr = jcf->buffer;
jcf->read_end = jcf->buffer_end;
if (lseek (zipf->fd, zipd->filestart, 0) < 0
|| read (zipf->fd, jcf->buffer, zipd->size) != (long) zipd->size)
return -2;
}
else
{
char *buffer;
z_stream d_stream; /* decompression stream */
memset (&d_stream, 0, sizeof (d_stream));
jcf->buffer = XNEWVEC (unsigned char, zipd->uncompressed_size);
d_stream.next_out = jcf->buffer;
d_stream.avail_out = zipd->uncompressed_size;
jcf->buffer_end = jcf->buffer + zipd->uncompressed_size;
jcf->read_ptr = jcf->buffer;
jcf->read_end = jcf->buffer_end;
buffer = XNEWVEC (char, zipd->size);
d_stream.next_in = (unsigned char *) buffer;
d_stream.avail_in = zipd->size;
if (lseek (zipf->fd, zipd->filestart, 0) < 0
|| read (zipf->fd, buffer, zipd->size) != (long) zipd->size)
return -2;
/* Handle NO_HEADER using undocumented zlib feature.
This is a very common hack. */
inflateInit2 (&d_stream, -MAX_WBITS);
inflate (&d_stream, Z_NO_FLUSH);
inflateEnd (&d_stream);
free (buffer);
}
return 0;
}
const char *
open_class (const char *filename, JCF *jcf, int fd, const char *dep_name)
{
if (jcf)
{
struct stat stat_buf;
if (fstat (fd, &stat_buf) != 0
|| ! S_ISREG (stat_buf.st_mode))
{
perror ("Could not figure length of .class file");
return NULL;
}
if (dep_name != NULL)
jcf_dependency_add_file (dep_name, 0);
JCF_ZERO (jcf);
jcf->buffer = XNEWVEC (unsigned char, stat_buf.st_size);
jcf->buffer_end = jcf->buffer + stat_buf.st_size;
jcf->read_ptr = jcf->buffer;
jcf->read_end = jcf->buffer_end;
jcf->read_state = NULL;
jcf->filename = xstrdup (filename);
if (read (fd, jcf->buffer, stat_buf.st_size) != stat_buf.st_size)
{
perror ("Failed to read .class file");
return NULL;
}
close (fd);
jcf->filbuf = jcf_unexpected_eof;
}
else
close (fd);
return filename;
}
const char *
find_classfile (char *filename, JCF *jcf, const char *dep_name)
{
int fd = open (filename, O_RDONLY | O_BINARY);
if (fd < 0)
return NULL;
return open_class (filename, jcf, fd, dep_name);
}
/* A hash table keeping track of class names that were not found
during class lookup. (There is no need to cache the values
associated with names that were found; they are saved in
IDENTIFIER_CLASS_VALUE.) */
static hash_table<nofree_string_hash> *memoized_class_lookups;
/* Returns a freshly malloc'd string with the fully qualified pathname
of the .class file for the class CLASSNAME. CLASSNAME must be
allocated in permanent storage; this function may retain a pointer
to it. Returns NULL on failure. If JCF != NULL, it is suitably
initialized. SOURCE_OK is true if we should also look for .java
file. */
const char *
find_class (const char *classname, int classname_length, JCF *jcf)
{
int fd;
int i, k, klass = -1;
struct stat class_buf;
char *dep_file;
void *entry;
int buflen;
char *buffer;
hashval_t hash;
/* Create the hash table, if it does not already exist. */
if (!memoized_class_lookups)
memoized_class_lookups = new hash_table<nofree_string_hash> (37);
/* Loop for this class in the hashtable. If it is present, we've
already looked for this class and failed to find it. */
hash = nofree_string_hash::hash (classname);
if (memoized_class_lookups->find_with_hash (classname, hash))
return NULL;
/* Allocate and zero out the buffer, since we don't explicitly put a
null pointer when we're copying it below. */
buflen = jcf_path_max_len () + classname_length + 10;
buffer = XNEWVAR (char, buflen);
memset (buffer, 0, buflen);
for (entry = jcf_path_start (); entry != NULL; entry = jcf_path_next (entry))
{
const char *path_name = jcf_path_name (entry);
if (klass != 0)
{
int dir_len;
strcpy (buffer, path_name);
i = strlen (buffer);
/* This is right because we know that `.zip' entries will have a
trailing slash. See jcf-path.c. */
dir_len = i - 1;
for (k = 0; k < classname_length; k++, i++)
{
char ch = classname[k];
buffer[i] = ch == '.' ? '/' : ch;
}
strcpy (buffer+i, ".class");
if (jcf_path_is_zipfile (entry))
{
int err_code;
JCF _jcf;
buffer[dir_len] = '\0';
SOURCE_FRONTEND_DEBUG
(("Trying [...%s]:%s",
&buffer[dir_len-(dir_len > 15 ? 15 : dir_len)],
buffer+dir_len+1));
if (jcf == NULL)
jcf = &_jcf;
err_code = open_in_zip (jcf, buffer, buffer+dir_len+1,
jcf_path_is_system (entry));
if (err_code == 0)
{
/* Should we check if .zip is out-of-date wrt .java? */
buffer[dir_len] = '(';
strcpy (buffer+i, ".class)");
if (jcf == &_jcf)
JCF_FINISH (jcf);
return buffer;
}
else
continue;
}
klass = stat (buffer, &class_buf);
}
}
dep_file = buffer;
if (!klass)
{
SOURCE_FRONTEND_DEBUG ((stderr, "[Class selected: %s]\n",
classname+classname_length-
(classname_length <= 30 ?
classname_length : 30)));
fd = JCF_OPEN_EXACT_CASE (buffer, O_RDONLY | O_BINARY);
if (fd >= 0)
goto found;
}
free (buffer);
/* Remember that this class could not be found so that we do not
have to look again. */
*memoized_class_lookups->find_slot_with_hash (classname, hash, INSERT)
= classname;
return NULL;
found:
{
const char *const tmp = open_class (buffer, jcf, fd, dep_file);
jcf->classname = xstrdup (classname);
return tmp;
}
}
void
jcf_print_char (FILE *stream, int ch)
{
switch (ch)
{
case '\'':
case '\\':
case '\"':
fprintf (stream, "\\%c", ch);
break;
case '\n':
fprintf (stream, "\\n");
break;
case '\t':
fprintf (stream, "\\t");
break;
case '\r':
fprintf (stream, "\\r");
break;
default:
if (ch >= ' ' && ch < 127)
putc (ch, stream);
else if (ch < 256)
fprintf (stream, "\\%03x", ch);
else
fprintf (stream, "\\u%04x", ch);
}
}
/* Print UTF8 string at STR of length LENGTH bytes to STREAM. */
void
jcf_print_utf8 (FILE *stream, const unsigned char *str, int length)
{
const unsigned char * limit = str + length;
while (str < limit)
{
int ch = UTF8_GET (str, limit);
if (ch < 0)
{
fprintf (stream, "\\<invalid>");
return;
}
jcf_print_char (stream, ch);
}
}
/* Same as jcf_print_utf8, but print IN_CHAR as OUT_CHAR. */
void
jcf_print_utf8_replace (FILE *stream, const unsigned char *str, int length,
int in_char, int out_char)
{
const unsigned char *limit = str + length;
while (str < limit)
{
int ch = UTF8_GET (str, limit);
if (ch < 0)
{
fprintf (stream, "\\<invalid>");
return;
}
jcf_print_char (stream, ch == in_char ? out_char : ch);
}
}
/* Check that all the cross-references in the constant pool are
valid. Returns 0 on success.
Otherwise, returns the index of the (first) invalid entry.
Only checks internal consistency, but does not check that
any classes, fields, or methods are valid.*/
int
verify_constant_pool (JCF *jcf)
{
int i, n;
for (i = 1; i < JPOOL_SIZE (jcf); i++)
{
switch (JPOOL_TAG (jcf, i))
{
case CONSTANT_NameAndType:
n = JPOOL_USHORT2 (jcf, i);
if (n <= 0 || n >= JPOOL_SIZE(jcf)
|| JPOOL_TAG (jcf, n) != CONSTANT_Utf8)
return i;
/* fall through */
case CONSTANT_Class:
case CONSTANT_String:
n = JPOOL_USHORT1 (jcf, i);
if (n <= 0 || n >= JPOOL_SIZE(jcf)
|| JPOOL_TAG (jcf, n) != CONSTANT_Utf8)
return i;
break;
case CONSTANT_Fieldref:
case CONSTANT_Methodref:
case CONSTANT_InterfaceMethodref:
n = JPOOL_USHORT1 (jcf, i);
if (n <= 0 || n >= JPOOL_SIZE(jcf)
|| JPOOL_TAG (jcf, n) != CONSTANT_Class)
return i;
n = JPOOL_USHORT2 (jcf, i);
if (n <= 0 || n >= JPOOL_SIZE(jcf)
|| JPOOL_TAG (jcf, n) != CONSTANT_NameAndType)
return i;
break;
case CONSTANT_Long:
case CONSTANT_Double:
i++;
break;
case CONSTANT_Float:
case CONSTANT_Integer:
case CONSTANT_Utf8:
case CONSTANT_Unicode:
break;
case CONSTANT_MethodHandle:
n = JPOOL_USHORT1 (jcf, i);
if (n < 1 || n > 9)
return i;
n = JPOOL_USHORT2 (jcf, i);
if (n <= 0 || n >= JPOOL_SIZE(jcf))
return i;
break;
case CONSTANT_MethodType:
n = JPOOL_USHORT1 (jcf, i);
if (n <= 0 || n >= JPOOL_SIZE(jcf)
|| JPOOL_TAG (jcf, n) != CONSTANT_Utf8)
return i;
break;
case CONSTANT_InvokeDynamic:
n = JPOOL_USHORT2 (jcf, i);
if (n <= 0 || n >= JPOOL_SIZE(jcf)
|| JPOOL_TAG (jcf, n) != CONSTANT_NameAndType)
return i;
break;
default:
return i;
}
}
return 0;
}
void
format_uint (char *buffer, uint64 value, int base)
{
#define WRITE_BUF_SIZE (4 + sizeof(uint64) * 8)
char buf[WRITE_BUF_SIZE];
char *buf_ptr = buf+WRITE_BUF_SIZE; /* End of buf. */
int chars_written;
int i;
/* Now do the actual conversion, placing the result at the *end* of buf. */
/* Note this code does not pretend to be optimized. */
do {
int digit = value % base;
static const char digit_chars[] = "0123456789abcdefghijklmnopqrstuvwxyz";
*--buf_ptr = digit_chars[digit];
value /= base;
} while (value != 0);
chars_written = buf+WRITE_BUF_SIZE - buf_ptr;
for (i = 0; i < chars_written; i++)
buffer[i] = *buf_ptr++;
buffer[i] = 0;
}
void
format_int (char *buffer, jlong value, int base)
{
uint64 abs_value;
if (value < 0)
{
abs_value = -(uint64)value;
*buffer++ = '-';
}
else
abs_value = (uint64) value;
format_uint (buffer, abs_value, base);
}

File diff suppressed because it is too large Load Diff

View File

@ -1,516 +0,0 @@
/* Handle CLASSPATH, -classpath, and path searching.
Copyright (C) 1998-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
Java and all Java-based marks are trademarks or registered trademarks
of Sun Microsystems, Inc. in the United States and other countries.
The Free Software Foundation is independent of Sun Microsystems, Inc. */
/* Written by Tom Tromey <tromey@cygnus.com>, October 1998. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include <dirent.h>
#include "jcf.h"
#ifndef DIR_UP
#define DIR_UP ".."
#endif
/* Possible flag values. */
#define FLAG_SYSTEM 1
#define FLAG_ZIP 2
/* We keep linked lists of directory names. A ``directory'' can be
either an ordinary directory or a .zip file. */
struct entry
{
char *name;
int flags;
struct entry *next;
};
static void free_entry (struct entry **);
static void append_entry (struct entry **, struct entry *);
static void add_entry (struct entry **, const char *, int);
static void add_path (struct entry **, const char *, int);
/* We support several different ways to set the class path.
built-in system directory (only libgcj.jar)
CLASSPATH environment variable
-classpath option overrides $CLASSPATH
-CLASSPATH option is a synonym for -classpath (for compatibility)
-bootclasspath overrides built-in
-extdirs sets the extensions directory path (overrides built-in)
-I prepends path to list
We implement this by keeping several path lists, and then simply
ignoring the ones which are not relevant. */
/* This holds all the -I directories. */
static struct entry *include_dirs;
/* This holds the CLASSPATH environment variable. */
static struct entry *classpath_env;
/* This holds the -classpath command-line option. */
static struct entry *classpath_user;
/* This holds the default directories. Some of these will have the
"system" flag set. */
static struct entry *sys_dirs;
/* This holds the extensions path entries. */
static struct entry *extensions;
/* This is the sealed list. It is just a combination of other lists. */
static struct entry *sealed;
/* We keep track of the longest path we've seen. */
static int longest_path = 0;
static void
free_entry (struct entry **entp)
{
struct entry *e, *n;
for (e = *entp; e; e = n)
{
n = e->next;
free (e->name);
free (e);
}
*entp = NULL;
}
static void
append_entry (struct entry **entp, struct entry *ent)
{
/* It doesn't matter if this is slow, since it is run only at
startup, and then infrequently. */
struct entry *e;
/* Find end of list. */
for (e = *entp; e && e->next; e = e->next)
;
if (e)
e->next = ent;
else
*entp = ent;
}
static void
add_entry (struct entry **entp, const char *filename, int is_system)
{
int len;
struct entry *n;
n = XNEW (struct entry);
n->flags = is_system ? FLAG_SYSTEM : 0;
n->next = NULL;
len = strlen (filename);
if (len > 4 && (FILENAME_CMP (filename + len - 4, ".zip") == 0
|| FILENAME_CMP (filename + len - 4, ".jar") == 0))
{
n->flags |= FLAG_ZIP;
/* If the user uses -classpath then he'll have to include
libgcj.jar in the value. We check for this in a simplistic
way. Symlinks will fool this test. This is only used for
-MM and -MMD, so it probably isn't terribly important. */
if (! FILENAME_CMP (filename, LIBGCJ_ZIP_FILE))
n->flags |= FLAG_SYSTEM;
}
/* Note that we add a trailing separator to `.zip' names as well.
This is a little hack that lets the searching code in jcf-io.c
work more easily. Eww. */
if (! IS_DIR_SEPARATOR (filename[len - 1]))
{
char *f2 = (char *) alloca (len + 2);
strcpy (f2, filename);
f2[len] = DIR_SEPARATOR;
f2[len + 1] = '\0';
n->name = xstrdup (f2);
++len;
}
else
n->name = xstrdup (filename);
if (len > longest_path)
longest_path = len;
append_entry (entp, n);
}
static void
add_path (struct entry **entp, const char *cp, int is_system)
{
const char *startp, *endp;
if (cp)
{
char *buf = (char *) alloca (strlen (cp) + 3);
startp = endp = cp;
while (1)
{
if (! *endp || *endp == PATH_SEPARATOR)
{
if (endp == startp)
{
buf[0] = '.';
buf[1] = DIR_SEPARATOR;
buf[2] = '\0';
}
else
{
strncpy (buf, startp, endp - startp);
buf[endp - startp] = '\0';
}
add_entry (entp, buf, is_system);
if (! *endp)
break;
++endp;
startp = endp;
}
else
++endp;
}
}
}
static int init_done = 0;
/* Initialize the path module. */
void
jcf_path_init (void)
{
char *cp;
char *attempt, sep[2];
struct stat stat_b;
int found = 0, len;
if (init_done)
return;
init_done = 1;
sep[0] = DIR_SEPARATOR;
sep[1] = '\0';
cp = getenv ("GCC_EXEC_PREFIX");
if (cp)
{
attempt = (char *) alloca (strlen (cp) + 50);
/* The exec prefix can be something like
/usr/local/bin/../lib/gcc-lib/. We want to change this
into a pointer to the share/java directory. We support two
configurations: one where prefix and exec-prefix are the
same, and one where exec-prefix is `prefix/SOMETHING'. */
strcpy (attempt, cp);
strcat (attempt, DIR_UP);
strcat (attempt, sep);
strcat (attempt, DIR_UP);
strcat (attempt, sep);
len = strlen (attempt);
strcpy (attempt + len, "share");
strcat (attempt, sep);
strcat (attempt, "java");
strcat (attempt, sep);
strcat (attempt, "libgcj-" DEFAULT_TARGET_VERSION ".jar");
if (! stat (attempt, &stat_b))
{
add_entry (&sys_dirs, attempt, 1);
found = 1;
strcpy (&attempt[strlen (attempt)
- strlen ("libgcj-" DEFAULT_TARGET_VERSION ".jar")],
sep);
strcat (attempt, "ext");
strcat (attempt, sep);
if (! stat (attempt, &stat_b))
jcf_path_extdirs_arg (attempt);
}
else
{
strcpy (attempt + len, DIR_UP);
strcat (attempt, sep);
strcat (attempt, "share");
strcat (attempt, sep);
strcat (attempt, "java");
strcat (attempt, sep);
strcat (attempt, "libgcj-" DEFAULT_TARGET_VERSION ".jar");
if (! stat (attempt, &stat_b))
{
add_entry (&sys_dirs, attempt, 1);
found = 1;
strcpy (&attempt[strlen (attempt)
- strlen ("libgcj-" DEFAULT_TARGET_VERSION ".jar")],
sep);
strcat (attempt, "ext");
strcat (attempt, sep);
if (! stat (attempt, &stat_b))
jcf_path_extdirs_arg (attempt);
}
}
}
if (! found)
{
/* Desperation: use the installed one. */
char *extdirs;
add_entry (&sys_dirs, LIBGCJ_ZIP_FILE, 1);
extdirs = (char *) alloca (strlen (LIBGCJ_ZIP_FILE) + 1);
strcpy (extdirs, LIBGCJ_ZIP_FILE);
strcpy (&extdirs[strlen (LIBGCJ_ZIP_FILE)
- strlen ("libgcj-" DEFAULT_TARGET_VERSION ".jar")],
"ext");
strcat (extdirs, sep);
if (! stat (extdirs, &stat_b))
jcf_path_extdirs_arg (extdirs);
}
cp = getenv ("CLASSPATH");
add_path (&classpath_env, cp, 0);
}
/* Call this when -classpath is seen on the command line.
This overrides only the $CLASSPATH environment variable.
*/
void
jcf_path_classpath_arg (const char *path)
{
free_entry (&classpath_user);
add_path (&classpath_user, path, 0);
}
/* Call this when -bootclasspath is seen on the command line.
*/
void
jcf_path_bootclasspath_arg (const char *path)
{
free_entry (&sys_dirs);
add_path (&sys_dirs, path, 1);
}
/* Call this when -extdirs is seen on the command line.
*/
void
jcf_path_extdirs_arg (const char *cp)
{
const char *startp, *endp;
free_entry (&extensions);
if (cp)
{
char *buf = (char *) alloca (strlen (cp) + 3);
startp = endp = cp;
while (1)
{
if (! *endp || *endp == PATH_SEPARATOR)
{
if (endp == startp)
return;
strncpy (buf, startp, endp - startp);
buf[endp - startp] = '\0';
{
DIR *dirp = NULL;
int dirname_length = strlen (buf);
dirp = opendir (buf);
if (dirp == NULL)
return;
for (;;)
{
struct dirent *direntp = readdir (dirp);
if (!direntp)
break;
if (direntp->d_name[0] != '.')
{
char *name = (char *) alloca (dirname_length
+ strlen (direntp->d_name) + 2);
strcpy (name, buf);
if (! IS_DIR_SEPARATOR (name[dirname_length-1]))
{
name[dirname_length] = DIR_SEPARATOR;
name[dirname_length+1] = 0;
}
strcat (name, direntp->d_name);
add_entry (&extensions, name, 0);
}
}
if (dirp)
closedir (dirp);
}
if (! *endp)
break;
++endp;
startp = endp;
}
else
++endp;
}
}
}
/* Call this when -I is seen on the command line. */
void
jcf_path_include_arg (const char *path)
{
add_entry (&include_dirs, path, 0);
}
/* We `seal' the path by linking everything into one big list. Then
we provide a way to iterate through the sealed list. If PRINT is
true then we print the final class path to stderr. */
void
jcf_path_seal (int print)
{
struct entry *secondary;
sealed = include_dirs;
include_dirs = NULL;
if (classpath_user)
{
secondary = classpath_user;
classpath_user = NULL;
}
else
{
if (! classpath_env)
add_entry (&classpath_env, ".", 0);
secondary = classpath_env;
classpath_env = NULL;
}
free_entry (&classpath_user);
free_entry (&classpath_env);
append_entry (&sealed, secondary);
append_entry (&sealed, sys_dirs);
append_entry (&sealed, extensions);
sys_dirs = NULL;
extensions = NULL;
if (print)
{
struct entry *ent;
fprintf (stderr, "Class path starts here:\n");
for (ent = sealed; ent; ent = ent->next)
{
fprintf (stderr, " %s", ent->name);
if ((ent->flags & FLAG_SYSTEM))
fprintf (stderr, " (system)");
if ((ent->flags & FLAG_ZIP))
fprintf (stderr, " (zip)");
fprintf (stderr, "\n");
}
}
}
void *
jcf_path_start (void)
{
return (void *) sealed;
}
void *
jcf_path_next (void *x)
{
struct entry *ent = (struct entry *) 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 *
jcf_path_name (void *x)
{
struct entry *ent = (struct entry *) x;
return ent->name;
}
int
jcf_path_is_zipfile (void *x)
{
struct entry *ent = (struct entry *) x;
return (ent->flags & FLAG_ZIP);
}
int
jcf_path_is_system (void *x)
{
struct entry *ent = (struct entry *) x;
return (ent->flags & FLAG_SYSTEM);
}
int
jcf_path_max_len (void)
{
return longest_path;
}

View File

@ -1,575 +0,0 @@
/* 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-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
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. */
#include "jcf.h"
#include "zipfile.h"
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 *, int);
static int jcf_parse_methods (JCF *);
static int jcf_parse_final_attributes (JCF *);
static int jcf_parse_bootstrap_methods (JCF *, int) ATTRIBUTE_UNUSED;
#ifdef NEED_PEEK_ATTRIBUTE
static int peek_attribute (JCF *, int, const char *, int);
#endif
#ifdef NEED_SKIP_ATTRIBUTE
static void skip_attribute (JCF *, int);
#endif
/* Go through all available attribute (ATTRIBUTE_NUMER) and try to
identify PEEKED_NAME. Return 1 if PEEKED_NAME was found, 0
otherwise. JCF is restored to its initial position before
returning. */
#ifdef NEED_PEEK_ATTRIBUTE /* Not everyone uses this function */
static int
peek_attribute (JCF *jcf, int attribute_number, const char *peeked_name,
int peeked_name_length)
{
int to_return = 0;
long absolute_offset = (long)JCF_TELL (jcf);
int i;
for (i = 0; !to_return && i < attribute_number; i++)
{
uint16 attribute_name = (JCF_FILL (jcf, 6), JCF_readu2 (jcf));
uint32 attribute_length = JCF_readu4 (jcf);
int name_length;
const unsigned char *name_data;
JCF_FILL (jcf, (long) attribute_length);
if (attribute_name <= 0 || attribute_name >= JPOOL_SIZE(jcf)
|| JPOOL_TAG (jcf, attribute_name) != CONSTANT_Utf8)
continue;
name_length = JPOOL_UTF_LENGTH (jcf, attribute_name);
name_data = JPOOL_UTF_DATA (jcf, attribute_name);
if (name_length == peeked_name_length
&& ! memcmp (name_data, peeked_name, peeked_name_length))
{
to_return = 1;
break;
}
JCF_SKIP (jcf, attribute_length);
}
JCF_SEEK (jcf, absolute_offset);
return to_return;
}
#endif
#ifdef NEED_SKIP_ATTRIBUTE /* Not everyone uses this function */
static void
skip_attribute (JCF *jcf, int number_of_attribute)
{
while (number_of_attribute--)
{
JCF_u4 N;
JCF_FILL (jcf, 6);
(void) JCF_readu2 (jcf);
N = JCF_readu4 (jcf);
JCF_SKIP (jcf, N);
}
}
#endif
static int
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);
uint32 start_pos = JCF_TELL(jcf);
int name_length;
const unsigned char *name_data;
JCF_FILL (jcf, (long) attribute_length);
if (attribute_name <= 0 || attribute_name >= JPOOL_SIZE(jcf))
return -2;
if (JPOOL_TAG (jcf, attribute_name) != CONSTANT_Utf8)
return -2;
name_length = JPOOL_UTF_LENGTH (jcf, attribute_name);
name_data = JPOOL_UTF_DATA (jcf, attribute_name);
#define MATCH_ATTRIBUTE(S) \
(name_length == sizeof (S)-1 && memcmp (name_data, S, sizeof (S)-1) == 0)
#ifdef IGNORE_ATTRIBUTE
if (IGNORE_ATTRIBUTE (jcf, attribute_name, attribute_length))
{
JCF_SKIP (jcf, attribute_length);
}
else
#endif
#ifdef HANDLE_SOURCEFILE
if (MATCH_ATTRIBUTE ("SourceFile"))
{
uint16 sourcefile_index = JCF_readu2 (jcf);
HANDLE_SOURCEFILE(sourcefile_index);
}
else
#endif
#ifdef HANDLE_CONSTANTVALUE
if (MATCH_ATTRIBUTE ("ConstantValue"))
{
uint16 constantvalue_index = JCF_readu2 (jcf);
if (constantvalue_index <= 0 || constantvalue_index >= JPOOL_SIZE(jcf))
return -2;
HANDLE_CONSTANTVALUE(constantvalue_index);
}
else
#endif
#ifdef HANDLE_CODE_ATTRIBUTE
if (MATCH_ATTRIBUTE ("Code"))
{
uint16 j;
uint16 max_stack ATTRIBUTE_UNUSED = JCF_readu2 (jcf);
uint16 max_locals ATTRIBUTE_UNUSED = JCF_readu2 (jcf);
uint32 code_length = JCF_readu4 (jcf);
uint16 exception_table_length, attributes_count;
if (code_length + 12 > attribute_length)
return -1;
HANDLE_CODE_ATTRIBUTE(max_stack, max_locals, code_length);
JCF_SKIP (jcf, code_length);
exception_table_length = JCF_readu2 (jcf);
if (code_length + 8 * exception_table_length + 12 > attribute_length)
return -1;
#ifdef HANDLE_EXCEPTION_TABLE
HANDLE_EXCEPTION_TABLE (jcf->read_ptr, exception_table_length);
#endif
JCF_SKIP (jcf, 2 * 4 * exception_table_length);
attributes_count = JCF_readu2 (jcf);
for (j = 0; j < attributes_count; j++)
{
int code = get_attribute (jcf, index, JV_METHOD_ATTR);
if (code != 0)
return code;
}
}
else
#endif /* HANDLE_CODE_ATTRIBUTE */
#ifdef HANDLE_EXCEPTIONS_ATTRIBUTE
if (MATCH_ATTRIBUTE ("Exceptions"))
{
uint16 count = JCF_readu2 (jcf);
HANDLE_EXCEPTIONS_ATTRIBUTE (count);
}
else
#endif
#ifdef HANDLE_LINENUMBERTABLE_ATTRIBUTE
if (MATCH_ATTRIBUTE ("LineNumberTable"))
{
uint16 count = JCF_readu2 (jcf);
HANDLE_LINENUMBERTABLE_ATTRIBUTE (count);
}
else
#endif
#ifdef HANDLE_LOCALVARIABLETABLE_ATTRIBUTE
if (MATCH_ATTRIBUTE ("LocalVariableTable"))
{
uint16 count = JCF_readu2 (jcf);
HANDLE_LOCALVARIABLETABLE_ATTRIBUTE (count);
}
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"))
{
uint16 count = JCF_readu2 (jcf);
HANDLE_INNERCLASSES_ATTRIBUTE (count);
}
else
#endif
#ifdef HANDLE_SYNTHETIC_ATTRIBUTE
if (MATCH_ATTRIBUTE ("Synthetic"))
{
HANDLE_SYNTHETIC_ATTRIBUTE ();
}
else
#endif
#ifdef HANDLE_GCJCOMPILED_ATTRIBUTE
if (MATCH_ATTRIBUTE ("gnu.gcj.gcj-compiled"))
{
HANDLE_GCJCOMPILED_ATTRIBUTE ();
}
else
#endif
#ifdef HANDLE_DEPRECATED_ATTRIBUTE
if (MATCH_ATTRIBUTE ("Deprecated"))
{
HANDLE_DEPRECATED_ATTRIBUTE ();
}
else
#endif
#ifdef HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE
if (MATCH_ATTRIBUTE ("SourceDebugExtension")) /* JSR 45 */
{
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
if (MATCH_ATTRIBUTE ("BootstrapMethods"))
{
#ifdef HANDLE_BOOTSTRAP_METHODS_ATTRIBUTE
HANDLE_BOOTSTRAP_METHODS_ATTRIBUTE();
#else
JCF_SKIP (jcf, attribute_length);
#endif
}
else
{
#ifdef PROCESS_OTHER_ATTRIBUTE
PROCESS_OTHER_ATTRIBUTE(jcf, attribute_name, attribute_length);
#else
JCF_SKIP (jcf, attribute_length);
#endif
}
if ((long) (start_pos + attribute_length) != JCF_TELL(jcf))
return -1;
return 0;
}
/* Read and handle the pre-amble. */
static int
jcf_parse_preamble (JCF* jcf)
{
uint32 magic = (JCF_FILL (jcf, 8), JCF_readu4 (jcf));
uint16 minor_version ATTRIBUTE_UNUSED = JCF_readu2 (jcf);
uint16 major_version ATTRIBUTE_UNUSED = JCF_readu2 (jcf);
#ifdef HANDLE_MAGIC
HANDLE_MAGIC (magic, minor_version, major_version);
#endif
if (magic != 0xcafebabe)
return -1;
else
return 0;
}
/* Read and handle the constant pool.
Return 0 if OK.
Return -2 if a bad cross-reference (index of other constant) was seen.
*/
static int
jcf_parse_constant_pool (JCF* jcf)
{
int i, n;
JPOOL_SIZE (jcf) = (JCF_FILL (jcf, 2), JCF_readu2 (jcf));
jcf->cpool.tags = (uint8 *) ggc_alloc_atomic (JPOOL_SIZE (jcf));
jcf->cpool.data = (cpool_entry *) ggc_internal_cleared_alloc
(sizeof (jword) * JPOOL_SIZE (jcf));
jcf->cpool.tags[0] = 0;
#ifdef HANDLE_START_CONSTANT_POOL
HANDLE_START_CONSTANT_POOL (JPOOL_SIZE (jcf));
#endif
for (i = 1; i < (int) JPOOL_SIZE (jcf); i++)
{
int constant_kind;
/* Make sure at least 9 bytes are available. This is enough
for all fixed-sized constant pool entries (so we don't need many
more JCF_FILL calls below), but is small enough that
we are guaranteed to not hit EOF (in a valid .class file). */
JCF_FILL (jcf, 9);
constant_kind = JCF_readu (jcf);
jcf->cpool.tags[i] = constant_kind;
switch (constant_kind)
{
case CONSTANT_String:
case CONSTANT_Class:
jcf->cpool.data[i].w = JCF_readu2 (jcf);
break;
case CONSTANT_Fieldref:
case CONSTANT_Methodref:
case CONSTANT_InterfaceMethodref:
case CONSTANT_NameAndType:
jcf->cpool.data[i].w = JCF_readu2 (jcf);
jcf->cpool.data[i].w |= JCF_readu2 (jcf) << 16;
break;
case CONSTANT_Integer:
case CONSTANT_Float:
jcf->cpool.data[i].w = JCF_readu4 (jcf);
break;
case CONSTANT_Long:
case CONSTANT_Double:
jcf->cpool.data[i].w = JCF_readu4 (jcf);
i++; /* These take up two spots in the constant pool */
jcf->cpool.tags[i] = 0;
jcf->cpool.data[i].w = JCF_readu4 (jcf);
break;
case CONSTANT_Utf8:
n = JCF_readu2 (jcf);
JCF_FILL (jcf, n);
#ifdef HANDLE_CONSTANT_Utf8
HANDLE_CONSTANT_Utf8(jcf, i, n);
#else
jcf->cpool.data[i].w = JCF_TELL(jcf) - 2;
JCF_SKIP (jcf, n);
#endif
break;
case CONSTANT_MethodHandle:
jcf->cpool.data[i].w = JCF_readu (jcf);
jcf->cpool.data[i].w |= JCF_readu2 (jcf) << 16;
break;
case CONSTANT_MethodType:
jcf->cpool.data[i].w = JCF_readu2 (jcf);
break;
case CONSTANT_InvokeDynamic:
jcf->cpool.data[i].w = JCF_readu2 (jcf);
jcf->cpool.data[i].w |= JCF_readu2 (jcf) << 16;
break;
default:
return i;
}
}
return 0;
}
/* Read various class flags and numbers. */
static void
jcf_parse_class (JCF* jcf)
{
int i;
uint16 interfaces_count;
JCF_FILL (jcf, 8);
jcf->access_flags = JCF_readu2 (jcf);
jcf->this_class = JCF_readu2 (jcf);
jcf->super_class = JCF_readu2 (jcf);
interfaces_count = JCF_readu2 (jcf);
#ifdef HANDLE_CLASS_INFO
HANDLE_CLASS_INFO(jcf->access_flags, jcf->this_class, jcf->super_class, interfaces_count);
#endif
JCF_FILL (jcf, 2 * interfaces_count);
/* Read interfaces. */
for (i = 0; i < interfaces_count; i++)
{
uint16 index ATTRIBUTE_UNUSED = JCF_readu2 (jcf);
#ifdef HANDLE_CLASS_INTERFACE
HANDLE_CLASS_INTERFACE (index);
#endif
}
}
/* Read fields. */
static int
jcf_parse_fields (JCF* jcf)
{
int i, j;
uint16 fields_count;
JCF_FILL (jcf, 2);
fields_count = JCF_readu2 (jcf);
#ifdef HANDLE_START_FIELDS
HANDLE_START_FIELDS (fields_count);
#endif
for (i = 0; i < fields_count; i++)
{
uint16 access_flags = (JCF_FILL (jcf, 8), JCF_readu2 (jcf));
uint16 name_index = JCF_readu2 (jcf);
uint16 signature_index = JCF_readu2 (jcf);
uint16 attribute_count = JCF_readu2 (jcf);
#ifdef HANDLE_START_FIELD
HANDLE_START_FIELD (access_flags, name_index, signature_index,
attribute_count);
#endif
for (j = 0; j < attribute_count; j++)
{
int code = get_attribute (jcf, i, JV_FIELD_ATTR);
if (code != 0)
return code;
}
#ifdef HANDLE_END_FIELD
HANDLE_END_FIELD ();
#endif
}
#ifdef HANDLE_END_FIELDS
HANDLE_END_FIELDS ();
#endif
return 0;
}
/* Read methods. */
static int
jcf_parse_one_method (JCF* jcf, int index)
{
int i;
uint16 access_flags = (JCF_FILL (jcf, 8), JCF_readu2 (jcf));
uint16 name_index = JCF_readu2 (jcf);
uint16 signature_index = JCF_readu2 (jcf);
uint16 attribute_count = JCF_readu2 (jcf);
#ifdef HANDLE_METHOD
HANDLE_METHOD(access_flags, name_index, signature_index, attribute_count);
#endif
for (i = 0; i < attribute_count; i++)
{
int code = get_attribute (jcf, index, JV_METHOD_ATTR);
if (code != 0)
return code;
}
#ifdef HANDLE_END_METHOD
HANDLE_END_METHOD ();
#endif
return 0;
}
static int
jcf_parse_methods (JCF* jcf)
{
int i;
uint16 methods_count;
JCF_FILL (jcf, 2);
methods_count = JCF_readu2 (jcf);
#ifdef HANDLE_START_METHODS
HANDLE_START_METHODS (methods_count);
#endif
for (i = 0; i < methods_count; i++)
{
int code = jcf_parse_one_method (jcf, i);
if (code != 0)
return code;
}
#ifdef HANDLE_END_METHODS
HANDLE_END_METHODS ();
#endif
return 0;
}
/* Read attributes. */
static int
jcf_parse_final_attributes (JCF *jcf)
{
int i;
uint16 attributes_count = (JCF_FILL (jcf, 2), JCF_readu2 (jcf));
#ifdef START_FINAL_ATTRIBUTES
START_FINAL_ATTRIBUTES (attributes_count)
#endif
for (i = 0; i < attributes_count; i++)
{
int code = get_attribute (jcf, i, JV_CLASS_ATTR);
if (code != 0)
return code;
}
return 0;
}
/* Read and handle the "BootstrapMethods" attribute.
Return 0 if OK.
*/
static int
jcf_parse_bootstrap_methods (JCF* jcf, int attribute_length ATTRIBUTE_UNUSED)
{
int i;
uint16 num_methods = JCF_readu2 (jcf);
jcf->bootstrap_methods.count = num_methods;
jcf->bootstrap_methods.methods = ggc_vec_alloc<bootstrap_method> (num_methods);
#ifdef HANDLE_START_BOOTSTRAP_METHODS
HANDLE_START_BOOTSTRAP_METHODS (jcf, num_methods);
#endif
for (i = 0; i < num_methods; i++)
{
unsigned j;
bootstrap_method *m = &jcf->bootstrap_methods.methods[i];
m->method_ref = JCF_readu2 (jcf);
m->num_arguments = JCF_readu2 (jcf);
m->bootstrap_arguments = ggc_vec_alloc<unsigned> (m->num_arguments);
for (j = 0; j < m->num_arguments; j++)
m->bootstrap_arguments[j] = JCF_readu2 (jcf);
}
#ifdef HANDLE_END_BOOTSTRAP_METHODS
HANDLE_END_BOOTSTRAP_METHODS (num_methods);
#endif
return 0;
}

View File

@ -1,325 +0,0 @@
/* Utility macros to read Java(TM) .class files and byte codes.
Copyright (C) 1996-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
Java and all Java-based marks are trademarks or registered trademarks
of Sun Microsystems, Inc. in the United States and other countries.
The Free Software Foundation is independent of Sun Microsystems, Inc. */
/* Written by Per Bothner <bothner@cygnus.com>, February 1996. */
#ifndef GCC_JCF_H
#define GCC_JCF_H
#include "javaop.h"
#ifndef JCF_u4
#define JCF_u4 unsigned long
#endif
#ifndef JCF_u2
#define JCF_u2 unsigned short
#endif
#define ALLOC xmalloc
#define REALLOC xrealloc
#ifndef FREE
#define FREE(PTR) free(PTR)
#endif
#ifdef JCF_word
#define JCF_word JCF_u4
#endif
/* On case-insensitive file systems, we need to ensure that a request
to open a .java or .class file is honored only if the file to be
opened is of the exact case we are asking for. In other words, we
want to override the inherent case insensitivity of the underlying
file system. On other platforms, this macro becomes the vanilla
open() call.
If you want to add another host, add your define to the list below
(i.e. defined(WIN32) || defined(YOUR_HOST)) and add a host-specific
.c file to Make-lang.in similar to win32-host.c. */
#if defined(WIN32)
extern int
jcf_open_exact_case (const char* filename, int oflag);
#define JCF_OPEN_EXACT_CASE(X, Y) jcf_open_exact_case (X, Y)
#else
#define JCF_OPEN_EXACT_CASE open
#endif /* WIN32 */
struct JCF;
typedef int (*jcf_filbuf_t) (struct JCF*, int needed);
union GTY(()) cpool_entry {
jword GTY ((tag ("0"))) w;
tree GTY ((tag ("1"))) t;
};
#define cpool_entry_is_tree(tag) \
(tag & CONSTANT_ResolvedFlag) || tag == CONSTANT_Utf8
typedef struct GTY(()) CPool {
/* Available number of elements in the constants array, before it
must be re-allocated. */
int capacity;
/* The constant_pool_count. */
int count;
uint8 * GTY((atomic)) tags;
union cpool_entry * GTY((length ("%h.count"),
desc ("cpool_entry_is_tree (%1.tags%a)"))) data;
} CPool;
typedef struct GTY(()) bootstrap_method {
unsigned method_ref;
unsigned num_arguments;
unsigned * GTY((atomic)) bootstrap_arguments;
} bootstrap_method;
typedef struct GTY(()) BootstrapMethods {
unsigned count;
bootstrap_method* GTY((length ("%h.count"))) methods;
} BootstrapMethods;
struct ZipDirectory;
/* JCF encapsulates the state of reading a Java Class File. */
typedef struct GTY(()) JCF {
unsigned char * GTY ((skip)) buffer;
unsigned char * GTY ((skip)) buffer_end;
unsigned char * GTY ((skip)) read_ptr;
unsigned char * GTY ((skip)) read_end;
unsigned int right_zip : 1;
unsigned int finished : 1;
jcf_filbuf_t filbuf;
PTR GTY ((skip)) read_state;
const char *filename;
const char *classname;
/* Directory entry where it was found. */
struct ZipDirectory * GTY ((skip)) zipd;
JCF_u2 access_flags;
JCF_u2 this_class;
JCF_u2 super_class;
CPool cpool;
BootstrapMethods bootstrap_methods;
} JCF;
/*typedef JCF* JCF_FILE;*/
#define JCF_SEEN_IN_ZIP(JCF) ((JCF)->zipd != NULL)
/* The CPOOL macros take a (pointer to a) CPool.
The JPOOL macros take a (pointer to a) JCF.
Some of the latter should perhaps be deprecated or removed. */
#define CPOOL_COUNT(CPOOL) ((CPOOL)->count)
#define JPOOL_SIZE(JCF) CPOOL_COUNT(&(JCF)->cpool)
#define JPOOL_TAG(JCF, INDEX) ((JCF)->cpool.tags[INDEX])
/* The INDEX'th constant pool entry as a JCF_u4. */
#define CPOOL_UINT(CPOOL, INDEX) ((CPOOL)->data[INDEX].w)
#define JPOOL_UINT(JCF, INDEX) CPOOL_UINT(&(JCF)->cpool, INDEX) /*deprecated*/
/* The first uint16 of the INDEX'th constant pool entry. */
#define CPOOL_USHORT1(CPOOL, INDEX) ((CPOOL)->data[INDEX].w & 0xFFFF)
#define JPOOL_USHORT1(JCF, INDEX) CPOOL_USHORT1(&(JCF)->cpool, INDEX)
/* The second uint16 of the INDEX'th constant pool entry. */
#define CPOOL_USHORT2(CPOOL, INDEX) ((CPOOL)->data[INDEX].w >> 16)
#define JPOOL_USHORT2(JCF, INDEX) CPOOL_USHORT2(&(JCF)->cpool, INDEX)
#define JPOOL_LONG(JCF, INDEX) \
WORDS_TO_LONG (JPOOL_UINT(JCF, INDEX), JPOOL_UINT(JCF, (INDEX)+1))
#define JPOOL_DOUBLE(JCF, INDEX) \
WORDS_TO_DOUBLE (JPOOL_UINT(JCF, INDEX), JPOOL_UINT(JCF, (INDEX)+1))
#ifndef JPOOL_UTF_LENGTH
#define JPOOL_UTF_LENGTH(JCF, INDEX) \
GET_u2 ((JCF)->buffer+JPOOL_UINT(JCF, INDEX))
#endif
#ifndef JPOOL_UTF_DATA
#define JPOOL_UTF_DATA(JCF, INDEX) \
((JCF)->buffer+JPOOL_UINT(JCF, INDEX)+2)
#endif
#define JPOOL_INT(JCF, INDEX) (WORD_TO_INT(JPOOL_UINT (JCF, INDEX)))
#define JPOOL_FLOAT(JCF, INDEX) WORD_TO_FLOAT (JPOOL_UINT (JCF, INDEX))
#define CPOOL_INDEX_IN_RANGE(CPOOL, INDEX) \
((INDEX) > 0 && (INDEX) < CPOOL_COUNT(CPOOL))
#define CPOOL_FINISH(CPOOL) { \
(CPOOL)->tags = 0; \
(CPOOL)->data = 0; \
}
#define JCF_FINISH(JCF) { \
CPOOL_FINISH(&(JCF)->cpool); \
if ((JCF)->buffer) free ((JCF)->buffer); \
if ((JCF)->filename) free (CONST_CAST (char *, (JCF)->filename)); \
if ((JCF)->classname) free (CONST_CAST (char *, (JCF)->classname)); \
(JCF)->finished = 1; }
#define CPOOL_INIT(CPOOL) \
((CPOOL)->capacity = 0, (CPOOL)->count = 0, (CPOOL)->tags = 0, (CPOOL)->data = 0)
#define CPOOL_REINIT(CPOOL) ((CPOOL)->count = 0)
#define JCF_ZERO(JCF) \
((JCF)->buffer = (JCF)->buffer_end = (JCF)->read_ptr = (JCF)->read_end = 0,\
(JCF)->read_state = 0, (JCF)->filename = (JCF)->classname = 0, \
CPOOL_INIT(&(JCF)->cpool), (JCF)->zipd = 0, \
(JCF)->finished = 0)
/* Given that PTR points to a 2-byte unsigned integer in network
(big-endian) byte-order, return that integer. */
#define GET_u2(PTR) (((PTR)[0] << 8) | ((PTR)[1]))
/* Like GET_u2, but for little-endian format. */
#define GET_u2_le(PTR) (((PTR)[1] << 8) | ((PTR)[0]))
/* Given that PTR points to a 4-byte unsigned integer in network
(big-endian) byte-order, return that integer. */
#define GET_u4(PTR) (((JCF_u4)(PTR)[0] << 24) | ((JCF_u4)(PTR)[1] << 16) \
| ((JCF_u4)(PTR)[2] << 8) | ((JCF_u4)(PTR)[3]))
/* Like GET_u4, but for little-endian order. */
#define GET_u4_le(PTR) (((JCF_u4)(PTR)[3] << 24) | ((JCF_u4)(PTR)[2] << 16) \
| ((JCF_u4)(PTR)[1] << 8) | ((JCF_u4)(PTR)[0]))
/* Make sure there are COUNT bytes readable. */
#define JCF_FILL(JCF, COUNT) \
((JCF)->read_end-(JCF)->read_ptr >= (COUNT) ? 0 : (*(JCF)->filbuf)(JCF, COUNT))
#define JCF_GETC(JCF) (JCF_FILL(JCF, 1) ? -1 : *(JCF)->read_ptr++)
#define JCF_READ(JCF, BUFFER, N) \
(memcpy (BUFFER, (JCF)->read_ptr, N), (JCF)->read_ptr += (N))
#define JCF_SKIP(JCF,N) ((JCF)->read_ptr += (N))
#define JCF_readu(JCF) (*(JCF)->read_ptr++)
/* Reads an unsigned 2-byte integer in network (big-endian) byte-order
from JCF. Returns that integer.
Does not check for EOF (make sure to call JCF_FILL before-hand). */
#define JCF_readu2(JCF) ((JCF)->read_ptr += 2, GET_u2 ((JCF)->read_ptr-2))
#define JCF_readu2_le(JCF) ((JCF)->read_ptr += 2, GET_u2_le((JCF)->read_ptr-2))
/* Like JCF_readu2, but read a 4-byte unsigned integer. */
#define JCF_readu4(JCF) ((JCF)->read_ptr += 4, GET_u4 ((JCF)->read_ptr-4))
#define JCF_readu4_le(JCF) ((JCF)->read_ptr += 4, GET_u4_le((JCF)->read_ptr-4))
#define JCF_TELL(JCF) ((JCF)->read_ptr - (JCF)->buffer)
#define JCF_SEEK(JCF, POS) ((JCF)->read_ptr = (JCF)->buffer + (POS))
#define ACC_PUBLIC 0x0001
#define ACC_PRIVATE 0x0002
#define ACC_PROTECTED 0x0004
#define ACC_STATIC 0x0008
#define ACC_FINAL 0x0010
#define ACC_SYNCHRONIZED 0x0020
#define ACC_SUPER 0x0020
#define ACC_BRIDGE 0x0040
#define ACC_VOLATILE 0x0040
#define ACC_TRANSIENT 0x0080
#define ACC_VARARGS 0x0080
#define ACC_NATIVE 0x0100
#define ACC_INTERFACE 0x0200
#define ACC_ABSTRACT 0x0400
#define ACC_STRICT 0x0800
#define ACC_SYNTHETIC 0x01000
#define ACC_ANNOTATION 0x02000
#define ACC_ENUM 0x04000
/* "Invisible" refers to Miranda methods inserted into an abstract
class. It is also used in the runtime. */
#define ACC_INVISIBLE 0x8000
#define ACC_VISIBILITY (ACC_PUBLIC | ACC_PRIVATE | ACC_PROTECTED)
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_MethodHandle = 15,
CONSTANT_MethodType = 16,
CONSTANT_InvokeDynamic = 18,
CONSTANT_None = 0
};
#define DEFAULT_CLASS_PATH "."
extern const char *find_class (const char *, int, JCF *);
extern const char *find_classfile (char *, JCF*, const char *);
extern int jcf_filbuf_from_stdio (JCF *jcf, int count);
extern int jcf_unexpected_eof (JCF*, int) ATTRIBUTE_NORETURN;
/* Extract a character from a Java-style Utf8 string.
* PTR points to the current character.
* LIMIT points to the end of the Utf8 string.
* PTR is incremented to point after the character that gets returned.
* On an error, -1 is returned. */
#define UTF8_GET(PTR, LIMIT) \
((PTR) >= (LIMIT) ? -1 \
: *(PTR) < 128 ? *(PTR)++ \
: (*(PTR)&0xE0) == 0xC0 && ((PTR)+=2)<=(LIMIT) && ((PTR)[-1]&0xC0) == 0x80 \
? (((PTR)[-2] & 0x1F) << 6) + ((PTR)[-1] & 0x3F) \
: (*(PTR) & 0xF0) == 0xE0 && ((PTR) += 3) <= (LIMIT) \
&& ((PTR)[-2] & 0xC0) == 0x80 && ((PTR)[-1] & 0xC0) == 0x80 \
? (((PTR)[-3]&0x0F) << 12) + (((PTR)[-2]&0x3F) << 6) + ((PTR)[-1]&0x3F) \
: ((PTR)++, -1))
extern const char *jcf_write_base_directory;
/* Debug macros, for the front end */
#ifdef VERBOSE_SKELETON
#undef SOURCE_FRONTEND_DEBUG
#define SOURCE_FRONTEND_DEBUG(X) \
{if (!quiet_flag) {printf ("* "); printf X; putchar ('\n');} }
#else
#define SOURCE_FRONTEND_DEBUG(X)
#endif
/* Declarations for dependency code. */
extern void jcf_dependency_reset (void);
extern void jcf_dependency_set_target (const char *);
extern void jcf_dependency_add_target (const char *);
extern void jcf_dependency_set_dep_file (const char *);
extern void jcf_dependency_add_file (const char *, int);
extern void jcf_dependency_write (void);
extern void jcf_dependency_init (int);
extern void jcf_dependency_print_dummies (void);
/* Declarations for path handling code. */
extern void jcf_path_init (void);
extern void jcf_path_classpath_arg (const char *);
extern void jcf_path_bootclasspath_arg (const char *);
extern void jcf_path_extdirs_arg (const char *);
extern void jcf_path_include_arg (const char *);
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);
#endif /* ! GCC_JCF_H */

View File

@ -1,197 +0,0 @@
/* Program to generate "main" a Java(TM) class containing a main method.
Copyright (C) 1998-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
Java and all Java-based marks are trademarks or registered trademarks
of Sun Microsystems, Inc. in the United States and other countries.
The Free Software Foundation is independent of Sun Microsystems, Inc. */
/* Written by Per Bothner <bothner@cygnus.com> */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "diagnostic.h"
#include "java-tree.h"
#include "intl.h"
static char * do_mangle_classname (const char *string);
struct obstack name_obstack;
struct obstack *mangle_obstack = &name_obstack;
static void usage (const char *) ATTRIBUTE_NORETURN;
static void
usage (const char *name)
{
fprintf (stderr, _("Usage: %s [OPTIONS]... CLASSNAMEmain [OUTFILE]\n"),
name);
exit (1);
}
int
main (int argc, char **argv)
{
char *classname, *p;
FILE *stream;
const char *mangled_classname;
int i, last_arg;
int indirect = 0;
char *prog_name = argv[0];
p = argv[0] + strlen (argv[0]);
while (p != argv[0] && !IS_DIR_SEPARATOR (p[-1]))
--p;
progname = p;
xmalloc_set_program_name (progname);
/* Unlock the stdio streams. */
unlock_std_streams ();
gcc_init_libintl ();
diagnostic_initialize (global_dc, 0);
if (argc > 1 && ! strcmp (argv[1], "-findirect-dispatch"))
{
indirect = 1;
++argv;
--argc;
}
if (argc < 2)
usage (prog_name);
for (i = 1; i < argc; ++i)
{
if (! strncmp (argv[i], "-D", 2))
{
/* Handled later. Check "-D XXX=YYY". */
if (argv[i][2] == '\0')
i++;
}
else
break;
}
if (i < argc - 2 || i == argc)
usage (prog_name);
last_arg = i;
classname = argv[i];
/* 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 (prog_name);
else
*p = '\0';
gcc_obstack_init (mangle_obstack);
mangled_classname = do_mangle_classname (classname);
if (i < argc - 1 && strcmp (argv[i + 1], "-") != 0)
{
const char *outfile = argv[i + 1];
stream = fopen (outfile, "w");
if (stream == NULL)
{
fprintf (stderr, _("%s: Cannot open output file: %s\n"),
prog_name, outfile);
exit (1);
}
}
else
stream = stdout;
/* At this point every element of ARGV from 1 to LAST_ARG is a `-D'
option. Process them appropriately. */
fprintf (stream, "extern const char **_Jv_Compiler_Properties;\n");
if (indirect)
fprintf (stream, "extern void JvRunMainName ();\n");
else
fprintf (stream, "extern void JvRunMain ();\n");
fprintf (stream, "static const char *props[] =\n{\n");
for (i = 1; i < last_arg; ++i)
{
const char *p;
if (strcmp (argv[i], "-D") == 0)
continue;
fprintf (stream, " \"");
for (p = argv[i]; *p; ++p)
{
if (! ISPRINT (*p))
fprintf (stream, "\\%o", *p);
else if (*p == '\\' || *p == '"')
fprintf (stream, "\\%c", *p);
else
putc (*p, stream);
}
fprintf (stream, "\",\n");
}
fprintf (stream, " 0\n};\n\n");
fprintf (stream, "int main (int argc, const char **argv)\n");
fprintf (stream, "{\n");
fprintf (stream, " _Jv_Compiler_Properties = props;\n");
if (indirect)
fprintf (stream, " JvRunMainName (\"%s\", argc, argv);\n", classname);
else
{
fprintf (stream, " extern char %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"),
prog_name, argv[2]);
exit (1);
}
return 0;
}
static char *
do_mangle_classname (const char *string)
{
const char *ptr;
int count = 0;
obstack_grow (&name_obstack, "_ZN", 3);
for (ptr = string; *ptr; ptr++ )
{
if (*ptr == '.')
{
append_gpp_mangled_name (ptr - count, count);
count = 0;
}
else
count++;
}
append_gpp_mangled_name (&ptr [-count], count);
obstack_grow (mangle_obstack, "6class$E", strlen ("6class$E"));
obstack_1grow (mangle_obstack, '\0');
return XOBFINISH (mangle_obstack, char *);
}

View File

@ -1,646 +0,0 @@
/* Specific flags and argument handling of the front-end of the
GNU compiler for the Java(TM) language.
Copyright (C) 1996-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
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. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "gcc.h"
#include "jcf.h"
#include "opts.h"
/* Name of spec file. */
#define SPEC_FILE "libgcj.spec"
/* This bit is set if we saw a `-xfoo' language specification. */
#define LANGSPEC (1<<1)
/* True if this arg is a .java input file name. */
#define JAVA_FILE_ARG (1<<3)
/* True if this arg is a .class input file name. */
#define CLASS_FILE_ARG (1<<4)
/* True if this arg is a .zip or .jar input file name. */
#define ZIP_FILE_ARG (1<<5)
/* True if this arg is @FILE - where FILE contains a list of filenames. */
#define INDIRECT_FILE_ARG (1<<6)
/* True if this arg is a resource file. */
#define RESOURCE_FILE_ARG (1<<7)
static char *find_spec_file (const char *);
static int verify_class_name (const char *);
static const char *main_class_name = NULL;
int lang_specific_extra_outfiles = 0;
/* True if we should add -shared-libgcc to the command-line. */
int shared_libgcc = 1;
static const char jvgenmain_spec[] =
"jvgenmain %{findirect-dispatch} %{D*} %b %m.i |\n\
cc1 %m.i %1 \
%{!Q:-quiet} -dumpbase %b.c %{d*} %{m*}\
%{g*} %{O*} %I \
%{v:-version} %{pg:-p} %{p}\
%<fbounds-check %<fno-bounds-check\
%<fassume-compiled* %<fno-assume-compiled*\
%<fcompile-resource* %<fassert %<fno-assert \
%<femit-class-file %<femit-class-files %<fencoding*\
%<fuse-boehm-gc %<fhash-synchronization %<fjni\
%<findirect-dispatch\
%<fno-store-check %<foutput-class-dir\
%<fclasspath* %<fbootclasspath*\
%<fextdirs*\
%<fuse-divide-subroutine %<fno-use-divide-subroutine\
%<fuse-atomic-builtins %<fno-use-atomic-builtins\
%<fcheck-references %<fno-check-references\
%<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}}\
%{S:%W{o*}%{!o*:-o %b.s}}\
%(invoke_as)";
/* Return full path name of spec file if it is in DIR, or NULL if
not. */
static char *
find_spec_file (const char *dir)
{
char *spec;
struct stat sb;
spec = XNEWVEC (char, strlen (dir) + sizeof (SPEC_FILE) + 4);
strcpy (spec, dir);
strcat (spec, "/");
strcat (spec, SPEC_FILE);
if (! stat (spec, &sb))
return spec;
free (spec);
return NULL;
}
#define JAVA_START_CHAR_P(c) (c < 128 && (ISIDST (c) || c == '$'))
#define JAVA_PART_CHAR_P(c) (c < 128 \
&& (ISIDNUM (c) \
|| c == '$' \
|| (c >= 0x00 && c <= 0x08) \
|| (c >= 0x0e && c <= 0x1b) \
|| c == 0x7f))
/* Verify that NAME is a valid Java class name that might contain
`main'. Return 0 on failure. */
static int
verify_class_name (const char *name)
{
/* FIXME: what encoding do we use for command-line arguments? For
now we assume plain ASCII, which of course is wrong. */
while (*name)
{
int ch = *name++;
if (ch < 0 || ! JAVA_START_CHAR_P (ch))
return 0;
while (*name)
{
ch = *name++;
if (ch < 0)
return 0;
/* We found a break between class names. Next character
must be an identifier start again. */
if (ch == '.')
break;
if (! JAVA_PART_CHAR_P (ch))
return 0;
}
}
return 1;
}
void
lang_specific_driver (struct cl_decoded_option **in_decoded_options,
unsigned int *in_decoded_options_count,
int *in_added_libraries)
{
unsigned int i, j;
int saw_save_temps = 0;
/* This will be 0 if we encounter a situation where we should not
link in libgcj. */
int library = 1;
/* This will be 1 if multiple input files (.class and/or .java)
should be passed to a single jc1 invocation. */
int combine_inputs = 0;
/* Number of .java and .class source file arguments seen. */
int java_files_count = 0;
int class_files_count = 0;
/* Number of .zip or .jar file arguments seen. */
int zip_files_count = 0;
/* Number of '@FILES' arguments seen. */
int indirect_files_count = 0;
/* Name of file containing list of files to compile. */
char *filelist_filename = 0;
FILE *filelist_file = 0;
/* The number of arguments being added to what's in argv, other than
libraries. */
int added = 2;
/* The new argument list will be contained in this. */
struct cl_decoded_option *new_decoded_options;
/* Nonzero if we saw a `-xfoo' language specification on the
command line. Used to avoid adding our own -xc++ if the user
already gave a language for the file. */
int saw_speclang = 0;
/* Saw --resource, -C or -o options, respectively. */
int saw_resource = 0;
int saw_C = 0;
int saw_o = 0;
/* Saw some -O* or -g* option, respectively. */
int saw_O = 0;
int saw_g = 0;
/* Saw a `-D' option. */
int saw_D = 0;
/* An array used to flag each argument that needs a bit set for
LANGSPEC, MATHLIB, WITHLIBC, or GCLIB. */
int *args;
/* The total number of arguments with the new stuff. */
unsigned int argc;
/* The argument list. */
struct cl_decoded_option *decoded_options;
/* The number of libraries added in. */
int added_libraries;
/* The total number of arguments with the new stuff. */
unsigned int num_args = 1;
/* Nonzero if linking is supposed to happen. */
int will_link = 1;
/* Nonzero if we want to find the spec file. */
int want_spec_file = 1;
/* The argument we use to specify the spec file. */
char *spec_file = NULL;
/* If linking, nonzero if the BC-ABI is in use. */
int link_for_bc_abi = 0;
argc = *in_decoded_options_count;
decoded_options = *in_decoded_options;
added_libraries = *in_added_libraries;
args = XCNEWVEC (int, argc);
for (i = 1; i < argc; i++)
{
switch (decoded_options[i].opt_index)
{
case OPT_nostdlib:
case OPT_nodefaultlibs:
library = 0;
break;
case OPT_fmain_:
main_class_name = decoded_options[i].arg;
added--;
break;
case OPT__help:
want_spec_file = 0;
break;
case OPT_v:
if (argc == 2)
{
/* If they only gave us `-v', don't try to link
in libgcj. */
library = 0;
}
break;
case OPT_x:
saw_speclang = 1;
break;
case OPT_C:
saw_C = 1;
want_spec_file = 0;
if (library != 0)
added -= 2;
library = 0;
will_link = 0;
break;
case OPT_fcompile_resource_:
saw_resource = 1;
want_spec_file = 0;
if (library != 0)
--added;
library = 0;
will_link = 0;
break;
case OPT_D:
saw_D = 1;
break;
case OPT_g:
case OPT_gcoff:
case OPT_gdwarf_:
case OPT_ggdb:
case OPT_gstabs:
case OPT_gstabs_:
case OPT_gvms:
case OPT_gxcoff:
case OPT_gxcoff_:
saw_g = 1;
break;
case OPT_O:
case OPT_Os:
case OPT_Ofast:
saw_O = 1;
break;
case OPT_o:
saw_o = 1;
break;
case OPT_fclasspath_:
case OPT_fbootclasspath_:
case OPT_extdirs:
added -= 1;
break;
case OPT_c:
case OPT_S:
case OPT_E:
case OPT_M:
case OPT_MM:
/* Don't specify libraries if we won't link, since that would
cause a warning. */
library = 0;
added -= 2;
/* Remember this so we can confirm -fmain option. */
will_link = 0;
break;
case OPT_fsyntax_only:
library = 0;
will_link = 0;
continue;
case OPT_save_temps:
saw_save_temps = 1;
break;
case OPT_static_libgcc:
case OPT_static:
shared_libgcc = 0;
break;
case OPT_findirect_dispatch:
link_for_bc_abi = 1;
break;
case OPT_SPECIAL_input_file:
{
const char *arg = decoded_options[i].arg;
int len;
/* We don't do this anymore, since we don't get them with minus
signs on them. */
if (arg[0] == '\0' || arg[1] == '\0')
continue;
if (saw_speclang)
{
saw_speclang = 0;
continue;
}
if (saw_resource)
{
args[i] |= RESOURCE_FILE_ARG;
added += 2; /* for -xjava and -xnone */
}
if (arg[0] == '@')
{
args[i] |= INDIRECT_FILE_ARG;
indirect_files_count++;
added += 2; /* for -xjava and -xnone */
}
len = strlen (arg);
if (len > 5 && strcmp (arg + len - 5, ".java") == 0)
{
args[i] |= JAVA_FILE_ARG;
java_files_count++;
}
if (len > 6 && strcmp (arg + len - 6, ".class") == 0)
{
args[i] |= CLASS_FILE_ARG;
class_files_count++;
}
if (len > 4
&& (strcmp (arg + len - 4, ".zip") == 0
|| strcmp (arg + len - 4, ".jar") == 0))
{
args[i] |= ZIP_FILE_ARG;
zip_files_count++;
}
}
default:
/* Pass other options through. */
continue;
}
}
if (saw_D && ! main_class_name)
fatal_error (input_location, "can%'t specify %<-D%> without %<--main%>");
if (main_class_name && ! verify_class_name (main_class_name))
fatal_error (input_location,
"%qs is not a valid class name", main_class_name);
num_args = argc + added;
if (saw_resource)
{
if (! saw_o)
fatal_error (input_location, "--resource requires -o");
}
if (saw_C)
{
num_args += 3;
if (class_files_count + zip_files_count > 0)
{
warning (0, "already-compiled .class files ignored with -C");
num_args -= class_files_count + zip_files_count;
class_files_count = 0;
zip_files_count = 0;
}
num_args += 2; /* For -o NONE. */
if (saw_o)
fatal_error (input_location, "cannot specify both -C and -o");
}
if ((saw_o && java_files_count + class_files_count + zip_files_count > 1)
|| (saw_C && java_files_count > 1)
|| (indirect_files_count > 0
&& java_files_count + class_files_count + zip_files_count > 0))
combine_inputs = 1;
if (combine_inputs)
{
filelist_filename = make_temp_file ("jx");
if (filelist_filename == NULL)
fatal_error (input_location, "cannot create temporary file");
record_temp_file (filelist_filename, ! saw_save_temps, 0);
filelist_file = fopen (filelist_filename, "w");
if (filelist_file == NULL)
pfatal_with_name (filelist_filename);
num_args -= java_files_count + class_files_count + zip_files_count;
num_args += 3; /* for the combined arg "-xjava", and "-xnone" */
}
if (main_class_name)
{
lang_specific_extra_outfiles++;
}
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" */
if (combine_inputs && indirect_files_count > 0)
fatal_error (input_location,
"using both @FILE with multiple files not implemented");
/* There's no point adding -shared-libgcc if we don't have a shared
libgcc. */
#ifndef ENABLE_SHARED_LIBGCC
shared_libgcc = 0;
#endif
if (java_files_count > 0)
++num_args;
num_args += shared_libgcc;
num_args += link_for_bc_abi;
new_decoded_options = XNEWVEC (struct cl_decoded_option, num_args);
j = 0;
new_decoded_options[j++] = decoded_options[0];
if (combine_inputs || indirect_files_count > 0)
generate_option (OPT_ffilelist_file, NULL, 1, CL_DRIVER,
&new_decoded_options[j++]);
if (combine_inputs)
{
generate_option (OPT_x, "java", 1, CL_DRIVER,
&new_decoded_options[j++]);
generate_option_input_file (filelist_filename,
&new_decoded_options[j++]);
generate_option (OPT_x, "none", 1, CL_DRIVER,
&new_decoded_options[j++]);
}
if (java_files_count > 0)
generate_option (OPT_fsaw_java_file, NULL, 1, CL_DRIVER,
&new_decoded_options[j++]);
jcf_path_init ();
for (i = 1; i < argc; i++, j++)
{
new_decoded_options[j] = decoded_options[i];
if (decoded_options[i].errors & CL_ERR_MISSING_ARG)
continue;
if ((args[i] & RESOURCE_FILE_ARG) != 0)
{
generate_option (OPT_x, "java", 1, CL_DRIVER,
&new_decoded_options[j++]);
new_decoded_options[j++] = decoded_options[i];
generate_option (OPT_x, "none", 1, CL_DRIVER,
&new_decoded_options[j]);
}
switch (decoded_options[i].opt_index)
{
case OPT_I:
jcf_path_include_arg (decoded_options[i].arg);
--j;
continue;
case OPT_fclasspath_:
jcf_path_classpath_arg (decoded_options[i].arg);
--j;
continue;
case OPT_fbootclasspath_:
jcf_path_bootclasspath_arg (decoded_options[i].arg);
--j;
continue;
case OPT_extdirs:
jcf_path_extdirs_arg (decoded_options[i].arg);
--j;
continue;
case OPT_L:
if (spec_file == NULL)
spec_file = find_spec_file (decoded_options[i].arg);
break;
case OPT_fmain_:
if (! will_link)
fatal_error (input_location,
"cannot specify %<main%> class when not linking");
--j;
continue;
}
if ((args[i] & INDIRECT_FILE_ARG) != 0)
{
generate_option (OPT_x, "java", 1, CL_DRIVER,
&new_decoded_options[j++]);
/* Drop '@'. */
generate_option_input_file (decoded_options[i].arg + 1,
&new_decoded_options[j++]);
generate_option (OPT_x, "none", 1, CL_DRIVER,
&new_decoded_options[j]);
}
if ((args[i] & (CLASS_FILE_ARG|ZIP_FILE_ARG)) && saw_C)
{
--j;
continue;
}
if (combine_inputs
&& (args[i] & (CLASS_FILE_ARG|JAVA_FILE_ARG|ZIP_FILE_ARG)) != 0)
{
fputs (decoded_options[i].arg, filelist_file);
fputc ('\n', filelist_file);
--j;
continue;
}
}
/* Handle classpath setting. We specify the bootclasspath since
that requires the fewest changes to our existing code... */
jcf_path_seal (0);
generate_option (OPT_fbootclasspath_, jcf_path_compute (""), 1,
CL_DRIVER, &new_decoded_options[j++]);
if (combine_inputs)
{
if (fclose (filelist_file))
pfatal_with_name (filelist_filename);
}
/* If we saw no -O or -g option, default to -g1, for javac compatibility. */
if (saw_g + saw_O == 0)
generate_option (OPT_g, "1", 1, CL_DRIVER, &new_decoded_options[j++]);
/* Read the specs file corresponding to libgcj.
If we didn't find the spec file on the -L path, then we hope it
is somewhere in the standard install areas. */
if (want_spec_file)
generate_option (OPT_specs_, spec_file == NULL ? "libgcj.spec" : spec_file,
1, CL_DRIVER, &new_decoded_options[j++]);
if (saw_C)
{
generate_option (OPT_fsyntax_only, NULL, 1, CL_DRIVER,
&new_decoded_options[j++]);
generate_option (OPT_femit_class_files, NULL, 1, CL_DRIVER,
&new_decoded_options[j++]);
generate_option (OPT_S, NULL, 1, CL_DRIVER, &new_decoded_options[j++]);
generate_option (OPT_o, "NONE", 1, CL_DRIVER,
&new_decoded_options[j++]);
}
if (shared_libgcc)
generate_option (OPT_shared_libgcc, NULL, 1, CL_DRIVER,
&new_decoded_options[j++]);
if (link_for_bc_abi)
generate_option (OPT_s_bc_abi, NULL, 1, CL_DRIVER,
&new_decoded_options[j++]);
*in_decoded_options_count = j;
*in_decoded_options = new_decoded_options;
*in_added_libraries = added_libraries;
}
int
lang_specific_pre_link (void)
{
int err;
if (main_class_name == NULL)
return 0;
/* Append `main' to make the filename unique and allow
gcj --main=hello -save-temps hello.java
to work. jvgenmain needs to strip this `main' to arrive at the correct
class name. Append dummy `.c' that can be stripped by set_input so %b
is correct. */
set_input (concat (main_class_name, "main.c", NULL));
err = do_spec (jvgenmain_spec);
if (err == 0)
{
/* Shift the outfiles array so the generated main comes first.
This is important when linking against (non-shared) libraries,
since otherwise we risk (a) nothing getting linked or
(b) 'main' getting picked up from a library. */
int i = n_infiles;
const char *generated = outfiles[i];
while (--i >= 0)
outfiles[i + 1] = outfiles[i];
outfiles[0] = generated;
}
return err;
}

View File

@ -1,62 +0,0 @@
/* Definitions for specs for the GNU compiler for the Java(TM) language.
Copyright (C) 1996-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
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. */
/* This is the contribution to the `default_compilers' array in gcc.c for
Java. */
{".java", "@java" , 0, 0, 0},
{".class", "@java" , 0, 0, 0},
{".zip", "@java" , 0, 0, 0},
{".jar", "@java" , 0, 0, 0},
{"@java",
"%{fjni:%{femit-class-files:%e-fjni and -femit-class-files are incompatible}}\
%{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:%{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.
*/

View File

@ -1,912 +0,0 @@
/* Java(TM) language-specific utility routines.
Copyright (C) 1996-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
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. */
/* Hacked by Per Bothner <bothner@cygnus.com> February 1996. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "target.h"
#include "tree.h"
#include "diagnostic.h"
#include "java-tree.h"
#include "jcf.h"
#include "langhooks.h"
#include "langhooks-def.h"
#include "tree-dump.h"
#include "opts.h"
#include "context.h"
static bool java_init (void);
static void java_finish (void);
static unsigned int java_option_lang_mask (void);
static void java_init_options_struct (struct gcc_options *);
static void java_init_options (unsigned int, struct cl_decoded_option *);
static bool java_post_options (const char **);
static bool java_handle_option (size_t, const char *, int, int, location_t,
const struct cl_option_handlers *);
static void put_decl_string (const char *, int);
static void put_decl_node (tree, int);
static void java_print_error_function (diagnostic_context *, const char *,
diagnostic_info *);
static bool java_dump_tree (void *, tree);
static void dump_compound_expr (dump_info_p, tree);
static bool java_decl_ok_for_sibcall (const_tree);
static enum classify_record java_classify_record (tree type);
static tree java_eh_personality (void);
#ifndef TARGET_OBJECT_SUFFIX
# define TARGET_OBJECT_SUFFIX ".o"
#endif
/* Table of machine-independent attributes. */
const struct attribute_spec java_attribute_table[] =
{
{ "nonnull", 0, -1, false, true, true,
NULL, false },
{ NULL, 0, 0, false, false, false, NULL, false }
};
/* Used to avoid printing error messages with bogus function
prototypes. Starts out false. */
static bool inhibit_error_function_printing;
const char *resource_name;
/* When nonzero, -Wall was turned on. */
int flag_wall = 0;
/* When nonzero, report use of deprecated classes, methods, or fields. */
int flag_deprecated = 1;
/* When zero, don't optimize static class initialization. This flag shouldn't
be tested alone, use STATIC_CLASS_INITIALIZATION_OPTIMIZATION_P instead. */
/* FIXME: Make this work with gimplify. */
/* int flag_optimize_sci = 0; */
/* Don't attempt to verify invocations. */
int flag_verify_invocations = 0;
/* When nonzero, print extra version information. */
static int v_flag = 0;
JCF *current_jcf;
/* Variable controlling how dependency tracking is enabled in
java_init. */
static int dependency_tracking = 0;
/* Flag values for DEPENDENCY_TRACKING. */
#define DEPEND_SET_FILE 1
#define DEPEND_ENABLE 2
#define DEPEND_TARGET_SET 4
#define DEPEND_FILE_ALREADY_SET 8
struct GTY(()) language_function {
int unused;
};
#undef LANG_HOOKS_NAME
#define LANG_HOOKS_NAME "GNU Java"
#undef LANG_HOOKS_INIT
#define LANG_HOOKS_INIT java_init
#undef LANG_HOOKS_FINISH
#define LANG_HOOKS_FINISH java_finish
#undef LANG_HOOKS_OPTION_LANG_MASK
#define LANG_HOOKS_OPTION_LANG_MASK java_option_lang_mask
#undef LANG_HOOKS_INIT_OPTIONS_STRUCT
#define LANG_HOOKS_INIT_OPTIONS_STRUCT java_init_options_struct
#undef LANG_HOOKS_INIT_OPTIONS
#define LANG_HOOKS_INIT_OPTIONS java_init_options
#undef LANG_HOOKS_HANDLE_OPTION
#define LANG_HOOKS_HANDLE_OPTION java_handle_option
#undef LANG_HOOKS_POST_OPTIONS
#define LANG_HOOKS_POST_OPTIONS java_post_options
#undef LANG_HOOKS_PARSE_FILE
#define LANG_HOOKS_PARSE_FILE java_parse_file
#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL java_dup_lang_specific_decl
#undef LANG_HOOKS_DECL_PRINTABLE_NAME
#define LANG_HOOKS_DECL_PRINTABLE_NAME lang_printable_name
#undef LANG_HOOKS_PRINT_ERROR_FUNCTION
#define LANG_HOOKS_PRINT_ERROR_FUNCTION java_print_error_function
#undef LANG_HOOKS_TYPE_FOR_MODE
#define LANG_HOOKS_TYPE_FOR_MODE java_type_for_mode
#undef LANG_HOOKS_TYPE_FOR_SIZE
#define LANG_HOOKS_TYPE_FOR_SIZE java_type_for_size
#undef LANG_HOOKS_CLASSIFY_RECORD
#define LANG_HOOKS_CLASSIFY_RECORD java_classify_record
#undef LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN
#define LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN java_dump_tree
#undef LANG_HOOKS_GIMPLIFY_EXPR
#define LANG_HOOKS_GIMPLIFY_EXPR java_gimplify_expr
#undef LANG_HOOKS_DECL_OK_FOR_SIBCALL
#define LANG_HOOKS_DECL_OK_FOR_SIBCALL java_decl_ok_for_sibcall
#undef LANG_HOOKS_SET_DECL_ASSEMBLER_NAME
#define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME java_mangle_decl
#undef LANG_HOOKS_ATTRIBUTE_TABLE
#define LANG_HOOKS_ATTRIBUTE_TABLE java_attribute_table
#undef LANG_HOOKS_EH_PERSONALITY
#define LANG_HOOKS_EH_PERSONALITY java_eh_personality
#undef LANG_HOOKS_EH_USE_CXA_END_CLEANUP
#define LANG_HOOKS_EH_USE_CXA_END_CLEANUP true
/* Each front end provides its own. */
struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
/*
* process java-specific compiler command-line options
* return false, but do not complain if the option is not recognized.
*/
static bool
java_handle_option (size_t scode, const char *arg, int value,
int kind ATTRIBUTE_UNUSED, location_t loc ATTRIBUTE_UNUSED,
const struct cl_option_handlers *handlers ATTRIBUTE_UNUSED)
{
enum opt_code code = (enum opt_code) scode;
switch (code)
{
case OPT_I:
jcf_path_include_arg (arg);
break;
case OPT_M:
jcf_dependency_init (1);
dependency_tracking |= DEPEND_ENABLE;
break;
case OPT_MD_:
jcf_dependency_init (1);
dependency_tracking |= DEPEND_SET_FILE | DEPEND_ENABLE;
break;
case OPT_MF:
jcf_dependency_set_dep_file (arg);
dependency_tracking |= DEPEND_FILE_ALREADY_SET;
break;
case OPT_MM:
jcf_dependency_init (0);
dependency_tracking |= DEPEND_ENABLE;
break;
case OPT_MMD_:
jcf_dependency_init (0);
dependency_tracking |= DEPEND_SET_FILE | DEPEND_ENABLE;
break;
case OPT_MP:
jcf_dependency_print_dummies ();
break;
case OPT_MT:
jcf_dependency_set_target (arg);
dependency_tracking |= DEPEND_TARGET_SET;
break;
case OPT_Wall:
flag_wall = value;
/* When -Wall given, enable -Wunused. We do this because the C
compiler does it, and people expect it. */
warn_unused = value;
break;
case OPT_fenable_assertions_:
add_enable_assert (arg, value);
break;
case OPT_fenable_assertions:
add_enable_assert ("", value);
break;
case OPT_fdisable_assertions_:
add_enable_assert (arg, !value);
break;
case OPT_fdisable_assertions:
add_enable_assert ("", !value);
break;
case OPT_fassume_compiled_:
add_assume_compiled (arg, !value);
break;
case OPT_fassume_compiled:
add_assume_compiled ("", !value);
break;
case OPT_fbootclasspath_:
jcf_path_bootclasspath_arg (arg);
break;
case OPT_faux_classpath:
case OPT_fclasspath_:
jcf_path_classpath_arg (arg);
break;
case OPT_fcompile_resource_:
resource_name = arg;
break;
case OPT_fdump_:
if (!g->get_dumps ()->dump_switch_p (arg))
return false;
break;
case OPT_fencoding_:
/* Nothing. */
break;
case OPT_fextdirs_:
jcf_path_extdirs_arg (arg);
break;
case OPT_foutput_class_dir_:
/* 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;
gcc_unreachable ();
}
return true;
}
/* Global open file. */
FILE *finput;
static bool
java_init (void)
{
/* FIXME: Indirect dispatch isn't yet compatible with static class
init optimization. */
if (flag_indirect_dispatch)
always_initialize_class_p = true;
if (!flag_indirect_dispatch)
flag_indirect_classes = false;
jcf_path_seal (v_flag);
java_init_decl_processing ();
using_eh_for_cleanups ();
return true;
}
static void
java_finish (void)
{
jcf_dependency_write ();
}
/* Buffer used by lang_printable_name. */
static char *decl_buf = NULL;
/* Allocated size of decl_buf. */
static int decl_buflen = 0;
/* Length of used part of decl_buf; position for next character. */
static int decl_bufpos = 0;
/* Append the string STR to decl_buf.
It length is given by LEN; -1 means the string is nul-terminated. */
static void
put_decl_string (const char *str, int len)
{
if (len < 0)
len = strlen (str);
if (decl_bufpos + len >= decl_buflen)
{
if (decl_buf == NULL)
{
decl_buflen = len + 100;
decl_buf = XNEWVEC (char, decl_buflen);
}
else
{
decl_buflen *= 2;
decl_buf = XRESIZEVAR (char, decl_buf, decl_buflen);
}
}
strcpy (decl_buf + decl_bufpos, str);
decl_bufpos += len;
}
/* Append to decl_buf a printable name for NODE.
Depending on VERBOSITY, more information about NODE
is printed. Read the comments of decl_printable_name in
langhooks.h for more. */
static void
put_decl_node (tree node, int verbosity)
{
int was_pointer = 0;
if (TREE_CODE (node) == POINTER_TYPE)
{
node = TREE_TYPE (node);
was_pointer = 1;
}
if (DECL_P (node) && DECL_NAME (node) != NULL_TREE)
{
if (TREE_CODE (node) == FUNCTION_DECL)
{
if (verbosity == 0 && DECL_NAME (node))
/* We have been instructed to just print the bare name
of the function. */
{
put_decl_node (DECL_NAME (node), 0);
return;
}
/* We want to print the type the DECL belongs to. We don't do
that when we handle constructors. */
if (! DECL_CONSTRUCTOR_P (node)
&& ! DECL_ARTIFICIAL (node) && DECL_CONTEXT (node)
/* We want to print qualified DECL names only
if verbosity is higher than 1. */
&& verbosity >= 1)
{
put_decl_node (TREE_CODE (DECL_CONTEXT (node)) == FUNCTION_DECL
? DECL_CONTEXT (node)
: TYPE_NAME (DECL_CONTEXT (node)),
verbosity);
put_decl_string (".", 1);
}
if (! DECL_CONSTRUCTOR_P (node))
put_decl_node (DECL_NAME (node), verbosity);
if (TREE_TYPE (node) != NULL_TREE
/* We want to print function parameters only if verbosity
is higher than 2. */
&& verbosity >= 2)
{
int i = 0;
tree args = TYPE_ARG_TYPES (TREE_TYPE (node));
if (TREE_CODE (TREE_TYPE (node)) == METHOD_TYPE)
args = TREE_CHAIN (args);
put_decl_string ("(", 1);
for ( ; args != NULL_TREE && args != end_params_node;
args = TREE_CHAIN (args), i++)
{
if (i > 0)
put_decl_string (",", 1);
put_decl_node (TREE_VALUE (args), verbosity);
}
put_decl_string (")", 1);
}
}
else
put_decl_node (DECL_NAME (node), verbosity);
}
else if (TYPE_P (node) && TYPE_NAME (node) != NULL_TREE)
{
if (TREE_CODE (node) == RECORD_TYPE && TYPE_ARRAY_P (node)
/* Print detailed array information only if verbosity is higher
than 2. */
&& verbosity >= 2)
{
put_decl_node (TYPE_ARRAY_ELEMENT (node), verbosity);
put_decl_string("[]", 2);
}
else if (node == promoted_byte_type_node)
put_decl_string ("byte", 4);
else if (node == promoted_short_type_node)
put_decl_string ("short", 5);
else if (node == promoted_char_type_node)
put_decl_string ("char", 4);
else if (node == promoted_boolean_type_node)
put_decl_string ("boolean", 7);
else if (node == void_type_node && was_pointer)
put_decl_string ("null", 4);
else
put_decl_node (TYPE_NAME (node), verbosity);
}
else if (TREE_CODE (node) == IDENTIFIER_NODE)
put_decl_string (IDENTIFIER_POINTER (node), IDENTIFIER_LENGTH (node));
else
put_decl_string ("<unknown>", -1);
}
/* Return a user-friendly name for DECL.
The resulting string is only valid until the next call.
The value of the hook decl_printable_name is this function,
which is also called directly by java_print_error_function. */
const char *
lang_printable_name (tree decl, int v)
{
decl_bufpos = 0;
put_decl_node (decl, v);
put_decl_string ("", 1);
return decl_buf;
}
/* Print on stderr the current class and method context. This function
is the value of the hook print_error_function. */
static GTY(()) tree last_error_function_context;
static GTY(()) tree last_error_function;
static void
java_print_error_function (diagnostic_context *context ATTRIBUTE_UNUSED,
const char *file,
diagnostic_info *diagnostic ATTRIBUTE_UNUSED)
{
/* Don't print error messages with bogus function prototypes. */
if (inhibit_error_function_printing)
return;
if (current_function_decl != NULL
&& DECL_CONTEXT (current_function_decl) != NULL
&& DECL_CONTEXT (current_function_decl) != last_error_function_context)
{
if (file)
fprintf (stderr, "%s: ", file);
last_error_function_context = DECL_CONTEXT (current_function_decl);
fprintf (stderr, "In class '%s':\n",
lang_printable_name (last_error_function_context, 0));
}
if (last_error_function != current_function_decl)
{
if (file)
fprintf (stderr, "%s: ", file);
if (current_function_decl == NULL)
fprintf (stderr, "At top level:\n");
else
{
const char *name = lang_printable_name (current_function_decl, 2);
fprintf (stderr, "In %s '%s':\n",
(DECL_CONSTRUCTOR_P (current_function_decl) ? "constructor"
: "method"),
name);
}
last_error_function = current_function_decl;
}
}
/* Called to install the PRINT_ERROR_FUNCTION hook differently
according to LEVEL. LEVEL is 1 during early parsing, when function
prototypes aren't fully resolved. java_print_error_function is set
so it doesn't print incomplete function prototypes. When LEVEL is
2, function prototypes are fully resolved and can be printed when
reporting errors. */
void
lang_init_source (int level)
{
inhibit_error_function_printing = (level == 1);
}
static unsigned int
java_option_lang_mask (void)
{
return CL_Java;
}
/* Initialize options structure OPTS. */
static void
java_init_options_struct (struct gcc_options *opts)
{
opts->x_flag_bounds_check = 1;
opts->x_flag_exceptions = 1;
opts->x_flag_non_call_exceptions = 1;
/* In Java floating point operations never trap. */
opts->x_flag_trapping_math = 0;
opts->frontend_set_flag_trapping_math = true;
/* In Java arithmetic overflow always wraps around. */
opts->x_flag_wrapv = 1;
/* Java requires left-to-right evaluation of subexpressions. */
opts->x_flag_evaluation_order = 1;
/* Java catches NULL pointer exceptions, thus we can not necessarily
rely on a pointer having a non-NULL value after a dereference. */
opts->x_flag_delete_null_pointer_checks = 0;
}
static void
java_init_options (unsigned int decoded_options_count ATTRIBUTE_UNUSED,
struct cl_decoded_option *decoded_options ATTRIBUTE_UNUSED)
{
jcf_path_init ();
}
/* Post-switch processing. */
static bool
java_post_options (const char **pfilename)
{
const char *filename = *pfilename;
/* Excess precision other than "fast" requires front-end
support. */
if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD)
sorry ("-fexcess-precision=standard for Java");
flag_excess_precision_cmdline = EXCESS_PRECISION_FAST;
/* An absolute requirement: if we're not using indirect dispatch, we
must always verify everything. */
if (! flag_indirect_dispatch)
flag_verify_invocations = true;
if (flag_reduced_reflection)
{
if (flag_indirect_dispatch)
error ("-findirect-dispatch is incompatible "
"with -freduced-reflection");
if (flag_jni)
error ("-fjni is incompatible with -freduced-reflection");
}
/* Open input file. */
if (filename == 0 || !strcmp (filename, "-"))
{
finput = stdin;
filename = "stdin";
if (dependency_tracking)
error ("can%'t do dependency tracking with input from stdin");
}
else
{
if (dependency_tracking)
{
const char *dot;
/* If the target is set and the output filename is set, then
there's no processing to do here. Otherwise we must
compute one or the other. */
if (! ((dependency_tracking & DEPEND_TARGET_SET)
&& (dependency_tracking & DEPEND_FILE_ALREADY_SET)))
{
dot = strrchr (filename, '.');
if (dot == NULL)
error ("couldn%'t determine target name for dependency tracking");
else
{
char *buf = XNEWVEC (char, dot - filename +
3 + sizeof (TARGET_OBJECT_SUFFIX));
strncpy (buf, filename, dot - filename);
/* If emitting class files, we might have multiple
targets. The class generation code takes care of
registering them. Otherwise we compute the
target name here. */
if ((dependency_tracking & DEPEND_TARGET_SET))
; /* Nothing. */
else
{
strcpy (buf + (dot - filename), TARGET_OBJECT_SUFFIX);
jcf_dependency_set_target (buf);
}
if ((dependency_tracking & DEPEND_FILE_ALREADY_SET))
; /* Nothing. */
else if ((dependency_tracking & DEPEND_SET_FILE))
{
strcpy (buf + (dot - filename), ".d");
jcf_dependency_set_dep_file (buf);
}
else
jcf_dependency_set_dep_file ("-");
free (buf);
}
}
}
}
linemap_add (line_table, LC_ENTER, false, filename, 0);
linemap_add (line_table, LC_RENAME, false, "<built-in>", 0);
/* Initialize the compiler back end. */
return false;
}
/* Return either DECL or its known constant value (if it has one). */
tree
decl_constant_value (tree decl)
{
if (/* Don't change a variable array bound or initial value to a constant
in a place where a variable is invalid. */
current_function_decl != 0
&& ! TREE_THIS_VOLATILE (decl)
&& TREE_READONLY (decl)
&& DECL_INITIAL (decl) != 0
&& TREE_CODE (DECL_INITIAL (decl)) != ERROR_MARK
/* This is invalid if initial value is not constant.
If it has either a function call, a memory reference,
or a variable, then re-evaluating it could give different results. */
&& TREE_CONSTANT (DECL_INITIAL (decl))
/* Check for cases where this is sub-optimal, even though valid. */
&& TREE_CODE (DECL_INITIAL (decl)) != CONSTRUCTOR)
return DECL_INITIAL (decl);
return decl;
}
/* Every call to a static constructor has an associated boolean
variable which is in the outermost scope of the calling method.
This variable is used to avoid multiple calls to the static
constructor for each class.
It looks something like this:
foo ()
{
boolean dummy = OtherClass.is_initialized;
...
if (! dummy)
OtherClass.initialize();
... use OtherClass.data ...
}
Each of these boolean variables has an entry in the
DECL_FUNCTION_INIT_TEST_TABLE of a method. When inlining a method
we must merge the DECL_FUNCTION_INIT_TEST_TABLE from the function
being inlined and create the boolean variables in the outermost
scope of the method being inlined into. */
/* Create a mapping from a boolean variable in a method being inlined
to one in the scope of the method being inlined into. */
int
merge_init_test_initialization (treetreehash_entry **entry, void *x)
{
struct treetreehash_entry *ite = *entry;
splay_tree decl_map = (splay_tree)x;
splay_tree_node n;
tree *init_test_decl;
/* See if we have remapped this declaration. If we haven't there's
a bug in the inliner. */
n = splay_tree_lookup (decl_map, (splay_tree_key) ite->value);
gcc_assert (n);
/* Create a new entry for the class and its remapped boolean
variable. If we already have a mapping for this class we've
already initialized it, so don't overwrite the value. */
init_test_decl = java_treetreehash_new
(DECL_FUNCTION_INIT_TEST_TABLE (current_function_decl), ite->key);
if (!*init_test_decl)
*init_test_decl = (tree)n->value;
/* This fixes a weird case.
The front end assumes that once we have called a method that
initializes some class, we can assume the class is initialized. It
does this by setting the DECL_INITIAL of the init_test_decl for that
class, and no initializations are emitted for that class.
However, what if the method that is supposed to do the initialization
is itself inlined in the caller? When expanding the called method
we'll assume that the class initialization has already been done,
because the DECL_INITIAL of the init_test_decl is set.
To fix this we remove the DECL_INITIAL (in the caller scope) of all
the init_test_decls corresponding to classes initialized by the
inlined method. This makes the caller no longer assume that the
method being inlined does any class initializations. */
DECL_INITIAL (*init_test_decl) = NULL;
return true;
}
/* Merge the DECL_FUNCTION_INIT_TEST_TABLE from the function we're
inlining. */
void
java_inlining_merge_static_initializers (tree fn, void *decl_map)
{
DECL_FUNCTION_INIT_TEST_TABLE (fn)
->traverse<void *, merge_init_test_initialization> (decl_map);
}
/* Lookup a DECL_FUNCTION_INIT_TEST_TABLE entry in the method we're
inlining into. If we already have a corresponding entry in that
class we don't need to create another one, so we create a mapping
from the variable in the inlined class to the corresponding
pre-existing one. */
int
inline_init_test_initialization (treetreehash_entry **entry, void *x)
{
struct treetreehash_entry *ite = *entry;
splay_tree decl_map = (splay_tree)x;
tree h = java_treetreehash_find
(DECL_FUNCTION_INIT_TEST_TABLE (current_function_decl), ite->key);
if (! h)
return true;
splay_tree_insert (decl_map,
(splay_tree_key) ite->value,
(splay_tree_value) h);
return true;
}
/* Look up the boolean variables in the DECL_FUNCTION_INIT_TEST_TABLE
of a method being inlined. For each hone, if we already have a
variable associated with the same class in the method being inlined
into, create a new mapping for it. */
void
java_inlining_map_static_initializers (tree fn, void *decl_map)
{
DECL_FUNCTION_INIT_TEST_TABLE (fn)
->traverse<void *, inline_init_test_initialization> (decl_map);
}
/* Avoid voluminous output for deep recursion of compound exprs. */
static void
dump_compound_expr (dump_info_p di, tree t)
{
int i;
for (i=0; i<2; i++)
{
switch (TREE_CODE (TREE_OPERAND (t, i)))
{
case COMPOUND_EXPR:
dump_compound_expr (di, TREE_OPERAND (t, i));
break;
default:
dump_child ("expr", TREE_OPERAND (t, i));
}
}
}
static bool
java_dump_tree (void *dump_info, tree t)
{
enum tree_code code;
dump_info_p di = (dump_info_p) dump_info;
/* Figure out what kind of node this is. */
code = TREE_CODE (t);
switch (code)
{
case FUNCTION_DECL:
dump_child ("args", DECL_ARGUMENTS (t));
if (DECL_EXTERNAL (t))
dump_string (di, "undefined");
if (TREE_PUBLIC (t))
dump_string (di, "extern");
else
dump_string (di, "static");
if (DECL_LANG_SPECIFIC (t) && !dump_flag (di, TDF_SLIM, t))
dump_child ("inline body", DECL_SAVED_TREE (t));
return true;
case RETURN_EXPR:
dump_child ("expr", TREE_OPERAND (t, 0));
return true;
case GOTO_EXPR:
dump_child ("goto", TREE_OPERAND (t, 0));
return true;
case LABEL_EXPR:
dump_child ("label", TREE_OPERAND (t, 0));
return true;
case BLOCK:
if (BLOCK_EXPR_BODY (t))
{
tree local = BLOCK_VARS (t);
while (local)
{
tree next = TREE_CHAIN (local);
dump_child ("var", local);
local = next;
}
{
tree block = BLOCK_EXPR_BODY (t);
dump_child ("body", block);
block = TREE_CHAIN (block);
}
}
return true;
case COMPOUND_EXPR:
if (!dump_flag (di, TDF_SLIM, t))
return false;
dump_compound_expr (di, t);
return true;
default:
break;
}
return false;
}
/* Java calls can't, in general, be sibcalls because we need an
accurate stack trace in order to guarantee correct operation of
methods such as Class.forName(String) and
SecurityManager.getClassContext(). */
static bool
java_decl_ok_for_sibcall (const_tree decl)
{
return (decl != NULL && DECL_CONTEXT (decl) == output_class
&& !DECL_UNINLINABLE (decl));
}
static enum classify_record
java_classify_record (tree type)
{
if (! CLASS_P (type))
return RECORD_IS_STRUCT;
if (CLASS_INTERFACE (TYPE_NAME (type)))
return RECORD_IS_INTERFACE;
return RECORD_IS_CLASS;
}
static GTY(()) tree java_eh_personality_decl;
static tree
java_eh_personality (void)
{
if (!java_eh_personality_decl)
java_eh_personality_decl = build_personality_function ("gcj");
return java_eh_personality_decl;
}
#include "gt-java-lang.h"

View File

@ -1,452 +0,0 @@
; Options for the Java front end.
; Copyright (C) 2003-2016 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 3, 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 COPYING3. If not see
; <http://www.gnu.org/licenses/>.
; See the GCC internals manual for a description of this file's format.
; Please try to keep this file in ASCII collating order.
Language
Java
-CLASSPATH
Java Separate Alias(fclasspath=)
-all-warnings
Java Alias(Wall)
-bootclasspath
Java Separate Alias(fbootclasspath=)
-classpath
Java Separate Alias(fclasspath=)
-dependencies
Java Alias(M)
-encoding
Java Separate Alias(fencoding=)
-extdirs
Java Separate Alias(fextdirs=)
-include-directory
Java Separate Alias(I)
-include-directory=
Java Joined Alias(I)
-output-class-directory
Java Separate Alias(foutput-class-dir=)
-output-class-directory=
Java Joined Alias(foutput-class-dir=)
-resource
Java Separate Alias(fcompile-resource=)
-resource=
Java Joined Alias(fcompile-resource=)
-user-dependencies
Java Alias(MM)
C
Driver
; Java driver option in fact distinct from C-family option with the same name.
CLASSPATH
Java Separate Alias(fclasspath=)
D
Driver Joined Separate
; Java driver option similar to C-family option.
I
Java Joined Separate
; Documented for C
M
Java
; Documented for C
MD_
Java Undocumented RejectDriver
; Documented for C
MF
Java Separate
; Documented for C
MM
Java
; Documented for C
MMD_
Java Undocumented RejectDriver
; Documented for C
MP
Java
; Documented for C
MT
Java Separate
; Documented for C
Wall
Java
; Documented for C
Wdeprecated
Java Var(warn_deprecated)
; Documented for C
Wextraneous-semicolon
Java Var(flag_extraneous_semicolon)
Warn if deprecated empty statements are found.
Wout-of-date
Java Var(flag_newer) Init(1)
Warn if .class files are out of date.
Wredundant-modifiers
Java Var(flag_redundant)
Warn if modifiers are specified when not necessary.
bootclasspath
Java Separate Alias(fbootclasspath=)
classpath
Java Separate Alias(fclasspath=)
d
Java Separate SeparateAlias Alias(foutput-class-dir=)
; Different from language-independent -d with joined argument.
encoding
Java Separate Alias(fencoding=)
extdirs
Driver Separate
fCLASSPATH=
Java JoinedOrMissing RejectNegative Alias(fclasspath=)
--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.
fassume-compiled
Java
fassume-compiled=
Java JoinedOrMissing
fenable-assertions
Java
fenable-assertions=
Java JoinedOrMissing
fdisable-assertions
Java
fdisable-assertions=
Java JoinedOrMissing
fbootclasspath=
Java JoinedOrMissing RejectNegative
--bootclasspath=<path> Replace system path.
fcheck-references
Java Var(flag_check_references)
Generate checks for references to NULL.
fclasspath=
Java JoinedOrMissing RejectNegative
--classpath=<path> Set class path.
fcompile-resource=
Java Joined RejectNegative
femit-class-file
Java Var(flag_emit_class_files)
Output a class file.
femit-class-files
Java Var(flag_emit_class_files)
Alias for -femit-class-file.
fencoding=
Java Joined RejectNegative
--encoding=<encoding> Choose input encoding (defaults from your locale).
fextdirs=
Java Joined RejectNegative
--extdirs=<path> Set the extension directory path.
fmain=
Driver JoinedOrMissing RejectNegative
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.
fhash-synchronization
Java Var(flag_hash_synchronization)
Assume the runtime uses a hash table to map an object to its synchronization structure.
findirect-classes
Java Var(flag_indirect_classes) Init(1)
Generate instances of Class at runtime.
findirect-dispatch
Java Var(flag_indirect_dispatch)
Use offset tables for virtual method calls.
finline-functions
Java
fjni
Java Var(flag_jni)
Assume native functions are implemented using JNI.
foptimize-static-class-initialization
Java Var(flag_optimize_sci)
Enable optimization of static class initialization code.
foutput-class-dir=
Java Joined RejectNegative
freduced-reflection
Java Var(flag_reduced_reflection)
Reduce the amount of reflection meta-data generated.
fstore-check
Java Var(flag_store_check) Init(1)
Enable assignability checks for stores into object arrays.
fuse-boehm-gc
Java Var(flag_use_boehm_gc)
Generate code for the Boehm GC.
fuse-divide-subroutine
Java Var(flag_use_divide_subroutine) Init(1)
Call a library routine to do integer divisions.
fuse-atomic-builtins
Java Var(flag_use_atomic_builtins) Init(0)
Generate code for built-in atomic operations.
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.
s-bc-abi
Driver
static-libgcj
Driver
version
Java RejectDriver
;
; 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

View File

@ -1,725 +0,0 @@
/* Functions related to mangling class names for the GNU compiler
for the Java(TM) language.
Copyright (C) 1998-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
Java and all Java-based marks are trademarks or registered trademarks
of Sun Microsystems, Inc. in the United States and other countries.
The Free Software Foundation is independent of Sun Microsystems, Inc. */
/* Written by Per Bothner <bothner@cygnus.com> */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "stringpool.h"
#include "jcf.h"
#include "java-tree.h"
#include "langhooks-def.h"
static void mangle_class_field (tree);
static void mangle_vtable (tree);
static void mangle_field_decl (tree);
static void mangle_method_decl (tree);
static void mangle_local_cni_method_decl (tree);
static void mangle_type (tree);
static void mangle_pointer_type (tree);
static void mangle_array_type (tree);
static int mangle_record_type (tree, int);
static int find_compression_pointer_match (tree);
static int find_compression_array_match (tree);
static int find_compression_record_match (tree, tree *);
static int find_compression_array_template_match (tree);
static void set_type_package_list (tree);
static int entry_match_pointer_p (tree, int);
static void emit_compression_string (int);
static void init_mangling (void);
static tree finish_mangling (void);
static void compression_table_add (tree);
static void mangle_member_name (tree);
static struct obstack mangle_obstack_1;
struct obstack *mangle_obstack;
#define MANGLE_RAW_STRING(S) \
obstack_grow (mangle_obstack, (S), sizeof (S)-1)
/* atms: array template mangled string. */
static GTY(()) tree atms;
/* This is the mangling interface: a decl, a class field (.class) and
the vtable. */
void
java_mangle_decl (tree decl)
{
/* A copy of the check from the beginning of lhd_set_decl_assembler_name. */
/* set_decl_assembler_name may be called on TYPE_DECL to record ODR
name for C++ types. By default types have no ODR names. */
if (TREE_CODE (decl) == TYPE_DECL)
return;
/* The language-independent code should never use the
DECL_ASSEMBLER_NAME for lots of DECLs. Only FUNCTION_DECLs and
VAR_DECLs for variables with static storage duration need a real
DECL_ASSEMBLER_NAME. */
gcc_assert (TREE_CODE (decl) == FUNCTION_DECL
|| (TREE_CODE (decl) == VAR_DECL
&& (TREE_STATIC (decl)
|| DECL_EXTERNAL (decl)
|| TREE_PUBLIC (decl))));
/* Mangling only applies to class members. */
if (DECL_CONTEXT (decl) && TYPE_P (DECL_CONTEXT (decl)))
{
init_mangling ();
switch (TREE_CODE (decl))
{
case VAR_DECL:
if (DECL_LANG_SPECIFIC (decl))
{
if (DECL_CLASS_FIELD_P (decl))
{
mangle_class_field (decl);
break;
}
else if (DECL_VTABLE_P (decl))
{
mangle_vtable (DECL_CONTEXT (decl));
break;
}
}
mangle_field_decl (decl);
break;
case FUNCTION_DECL:
if (DECL_LANG_SPECIFIC (decl) && DECL_LOCAL_CNI_METHOD_P (decl))
mangle_local_cni_method_decl (decl);
else
mangle_method_decl (decl);
break;
default:
gcc_unreachable ();
}
SET_DECL_ASSEMBLER_NAME (decl, finish_mangling ());
}
else
lhd_set_decl_assembler_name (decl);
}
/* Beginning of the helper functions */
static void
mangle_class_field (tree decl)
{
tree type = DECL_CONTEXT (decl);
mangle_record_type (type, /* for_pointer = */ 0);
if (TREE_CODE (TREE_TYPE (decl)) == RECORD_TYPE)
MANGLE_RAW_STRING ("6class$");
else
MANGLE_RAW_STRING ("7class$$");
obstack_1grow (mangle_obstack, 'E');
}
static void
mangle_vtable (tree type)
{
MANGLE_RAW_STRING ("TV");
mangle_record_type (type, /* for_pointer = */ 0);
obstack_1grow (mangle_obstack, 'E');
}
/* This mangles a field decl */
static void
mangle_field_decl (tree decl)
{
/* Mangle the name of the this the field belongs to */
mangle_record_type (DECL_CONTEXT (decl), /* for_pointer = */ 0);
/* Mangle the name of the field */
mangle_member_name (DECL_NAME (decl));
/* Terminate the mangled name */
obstack_1grow (mangle_obstack, 'E');
}
/* This mangles a method decl, first mangling its name and then all
its arguments. */
static void
mangle_method_decl (tree mdecl)
{
tree method_name = DECL_NAME (mdecl);
tree arglist;
/* Mangle the name of the type that contains mdecl */
mangle_record_type (DECL_CONTEXT (mdecl), /* for_pointer = */ 0);
/* Mangle the function name. There are two cases:
- mdecl is a constructor, use `C1' for its name, (denotes a
complete object constructor.)
- mdecl is not a constructor, standard mangling is performed.
We terminate the mangled function name with a `E'. */
if (ID_INIT_P (method_name))
obstack_grow (mangle_obstack, "C1", 2);
else
mangle_member_name (method_name);
obstack_1grow (mangle_obstack, 'E');
/* We mangled type.methodName. Now onto the arguments. */
arglist = TYPE_ARG_TYPES (TREE_TYPE (mdecl));
if (TREE_CODE (TREE_TYPE (mdecl)) == METHOD_TYPE)
arglist = TREE_CHAIN (arglist);
/* Output literal 'J' and mangle the return type IF not a
constructor. */
if (!ID_INIT_P (method_name))
{
obstack_1grow (mangle_obstack, 'J');
mangle_type(TREE_TYPE(TREE_TYPE(mdecl)));
}
/* No arguments is easy. We shortcut it. */
if (arglist == end_params_node)
obstack_1grow (mangle_obstack, 'v');
else
{
tree arg;
for (arg = arglist; arg != end_params_node; arg = TREE_CHAIN (arg))
mangle_type (TREE_VALUE (arg));
}
}
/* This mangles a CNI method for a local class. If the target supports
hidden aliases, then G++ will have generated one for us. It is the
responsibility of java_mark_class_local to check target support, since
we need to set DECL_VISIBILITY (or not) much earlier. */
static void
mangle_local_cni_method_decl (tree decl)
{
MANGLE_RAW_STRING ("GA");
mangle_method_decl (decl);
}
/* This mangles a member name, like a function name or a field
name. Handle cases were `name' is a C++ keyword. Return a nonzero
value if unicode encoding was required. */
static void
mangle_member_name (tree name)
{
append_gpp_mangled_name (IDENTIFIER_POINTER (name),
IDENTIFIER_LENGTH (name));
}
/* Append the mangled name of TYPE onto OBSTACK. */
static void
mangle_type (tree type)
{
switch (TREE_CODE (type))
{
char code;
case BOOLEAN_TYPE: code = 'b'; goto primitive;
case VOID_TYPE: code = 'v'; goto primitive;
case INTEGER_TYPE:
if (type == char_type_node || type == promoted_char_type_node)
{
code = 'w';
goto primitive;
}
/* Get the original type instead of the arguments promoted type.
Avoid symbol name clashes. Should call a function to do that.
FIXME. */
if (type == promoted_short_type_node)
type = short_type_node;
if (type == promoted_byte_type_node)
type = byte_type_node;
switch (TYPE_PRECISION (type))
{
case 8: code = 'c'; goto primitive;
case 16: code = 's'; goto primitive;
case 32: code = 'i'; goto primitive;
case 64: code = 'x'; goto primitive;
default: goto bad_type;
}
primitive:
obstack_1grow (mangle_obstack, code);
break;
case REAL_TYPE:
switch (TYPE_PRECISION (type))
{
case 32: code = 'f'; goto primitive;
case 64: code = 'd'; goto primitive;
default: goto bad_type;
}
case POINTER_TYPE:
if (TYPE_ARRAY_P (TREE_TYPE (type)))
mangle_array_type (type);
else
mangle_pointer_type (type);
break;
bad_type:
default:
gcc_unreachable ();
}
}
/* The compression table is a vector that keeps track of things we've
already seen, so they can be reused. For example, java.lang.Object
would generate three entries: two package names and a type. If
java.lang.String is presented next, the java.lang will be matched
against the first two entries (and kept for compression as S0_), and
type String would be added to the table. See mangle_record_type.
COMPRESSION_NEXT is the index to the location of the next insertion
of an element. */
static GTY(()) tree compression_table;
static int compression_next;
/* Find a POINTER_TYPE in the compression table. Use a special
function to match pointer entries and start from the end */
static int
find_compression_pointer_match (tree type)
{
int i;
for (i = compression_next-1; i >= 0; i--)
if (entry_match_pointer_p (type, i))
return i;
return -1;
}
/* Already recorder arrays are handled like pointer as they're always
associated with it. */
static int
find_compression_array_match (tree type)
{
return find_compression_pointer_match (type);
}
/* Match the table of type against STRING. */
static int
find_compression_array_template_match (tree string)
{
int i;
for (i = 0; i < compression_next; i++)
if (TREE_VEC_ELT (compression_table, i) == string)
return i;
return -1;
}
/* We go through the compression table and try to find a complete or
partial match. The function returns the compression table entry
that (eventually partially) matches TYPE. *NEXT_CURRENT can be set
to the rest of TYPE to be mangled. */
static int
find_compression_record_match (tree type, tree *next_current)
{
int i, match = -1;
tree current, saved_current = NULL_TREE;
current = TYPE_PACKAGE_LIST (type);
for (i = 0; i < compression_next; i++)
{
tree compression_entry = TREE_VEC_ELT (compression_table, i);
if (current && compression_entry == TREE_PURPOSE (current))
{
match = i;
saved_current = current;
current = TREE_CHAIN (current);
}
else
/* We don't want to match an element that appears in the middle
of a package name, so skip forward to the next complete type name.
IDENTIFIER_NODEs (except for a "6JArray") are partial package
names while RECORD_TYPEs represent complete type names. */
while (i < compression_next
&& TREE_CODE (compression_entry) == IDENTIFIER_NODE
&& compression_entry != atms)
compression_entry = TREE_VEC_ELT (compression_table, ++i);
}
if (!next_current)
return match;
/* If we have a match, set next_current to the item next to the last
matched value. */
if (match >= 0)
*next_current = TREE_CHAIN (saved_current);
/* We had no match: we'll have to start from the beginning. */
if (match < 0)
*next_current = TYPE_PACKAGE_LIST (type);
return match;
}
/* Mangle a record type. If a nonzero value is returned, it means
that a 'N' was emitted (so that a matching 'E' can be emitted if
necessary.) FOR_POINTER indicates that this element is for a pointer
symbol, meaning it was preceded by a 'P'. */
static int
mangle_record_type (tree type, int for_pointer)
{
tree current;
int match;
int nadded_p = 0;
int qualified;
/* Does this name have a package qualifier? */
qualified = QUALIFIED_P (DECL_NAME (TYPE_NAME (type)));
#define ADD_N() \
do { obstack_1grow (mangle_obstack, 'N'); nadded_p = 1; } while (0)
gcc_assert (TREE_CODE (type) == RECORD_TYPE);
if (!TYPE_PACKAGE_LIST (type))
set_type_package_list (type);
match = find_compression_record_match (type, &current);
if (match >= 0)
{
/* If we had a pointer, and there's more, we need to emit
'N' after 'P' (for_pointer tells us we already emitted it.) */
if (for_pointer && current)
ADD_N();
emit_compression_string (match);
}
while (current)
{
/* Add the new type to the table */
compression_table_add (TREE_PURPOSE (current));
/* Add 'N' if we never got a chance to, but only if we have a qualified
name. For non-pointer elements, the name is always qualified. */
if ((qualified || !for_pointer) && !nadded_p)
ADD_N();
/* Use the bare type name for the mangle. */
append_gpp_mangled_name (IDENTIFIER_POINTER (TREE_VALUE (current)),
IDENTIFIER_LENGTH (TREE_VALUE (current)));
current = TREE_CHAIN (current);
}
return nadded_p;
#undef ADD_N
}
/* Mangle a pointer type. There are two cases: the pointer is already
in the compression table: the compression is emitted sans 'P'
indicator. Otherwise, a 'P' is emitted and, depending on the type,
a partial compression or/plus the rest of the mangling. */
static void
mangle_pointer_type (tree type)
{
int match;
tree pointer_type;
/* Search for the type already in the compression table */
if ((match = find_compression_pointer_match (type)) >= 0)
{
emit_compression_string (match);
return;
}
/* This didn't work. We start by mangling the pointed-to type */
pointer_type = type;
type = TREE_TYPE (type);
gcc_assert (TREE_CODE (type) == RECORD_TYPE);
obstack_1grow (mangle_obstack, 'P');
if (mangle_record_type (type, /* for_pointer = */ 1))
obstack_1grow (mangle_obstack, 'E');
/* Don't forget to insert the pointer type in the table */
compression_table_add (pointer_type);
}
/* Mangle an array type. Search for an easy solution first, then go
through the process of finding out whether the bare array type or even
the template indicator were already used and compressed appropriately.
It handles pointers. */
static void
mangle_array_type (tree p_type)
{
tree type, elt_type;
int match;
type = TREE_TYPE (p_type);
gcc_assert (type);
elt_type = TYPE_ARRAY_ELEMENT (type);
/* We cache a bit of the Jarray <> mangle. */
if (!atms)
{
atms = get_identifier ("6JArray");
}
/* Maybe we have what we're looking for in the compression table. */
if ((match = find_compression_array_match (p_type)) >= 0)
{
emit_compression_string (match);
return;
}
/* We know for a fact that all arrays are pointers */
obstack_1grow (mangle_obstack, 'P');
/* Maybe we already have a Jarray<t> somewhere. PSx_ will be enough. */
if ((match = find_compression_record_match (type, NULL)) > 0)
{
emit_compression_string (match);
return;
}
/* Maybe we already have just JArray somewhere */
if ((match = find_compression_array_template_match (atms)) > 0)
emit_compression_string (match);
else
{
/* Start the template mangled name */
obstack_grow (mangle_obstack,
IDENTIFIER_POINTER (atms), IDENTIFIER_LENGTH (atms));
/* Insert in the compression table */
compression_table_add (atms);
}
/* Mangle Jarray <elt_type> */
obstack_1grow (mangle_obstack, 'I');
mangle_type (elt_type);
obstack_1grow (mangle_obstack, 'E');
/* Add `Jarray <elt_type>' and `Jarray <elt_type> *' to the table */
compression_table_add (type);
compression_table_add (p_type);
}
/* Write a substitution string for entry I. Substitution string starts a
-1 (encoded S_.) The base is 36, and the code shamelessly taken from
cp/mangle.c. */
static void
emit_compression_string (int i)
{
i -= 1; /* Adjust */
obstack_1grow (mangle_obstack, 'S');
if (i >= 0)
{
static const char digits[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
unsigned HOST_WIDE_INT n;
unsigned HOST_WIDE_INT m=1;
/* How many digits for I in base 36? */
for (n = i; n >= 36; n /= 36, m *=36);
/* Write the digits out */
while (m > 0)
{
int digit = i / m;
obstack_1grow (mangle_obstack, digits [digit]);
i -= digit * m;
m /= 36;
}
}
obstack_1grow (mangle_obstack, '_');
}
/* If search the compression table at index I for a pointer type
equivalent to TYPE (meaning that after all the indirection, which
might all be unique, we find the same RECORD_TYPE.) */
static int
entry_match_pointer_p (tree type, int i)
{
tree t = TREE_VEC_ELT (compression_table, i);
while (TREE_CODE (type) == POINTER_TYPE
&& TREE_CODE (t) == POINTER_TYPE)
{
t = TREE_TYPE (t);
type = TREE_TYPE (type);
}
return (TREE_CODE (type) == RECORD_TYPE
&& TREE_CODE (t) == RECORD_TYPE
&& t == type);
}
/* Go through all qualification of type and build a list of list node
elements containings as a purpose what should be used for a match and
inserted in the compression table; and as it value the raw name of the
part. The result is stored in TYPE_PACKAGE_LIST to be reused. */
static void
set_type_package_list (tree type)
{
int i;
const char *type_string = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)));
const char *ptr;
int qualifications;
tree list = NULL_TREE, elt;
for (ptr = type_string, qualifications = 0; *ptr; ptr++)
if (*ptr == '.')
qualifications += 1;
for (ptr = type_string, i = 0; i < qualifications; ptr++)
{
if (ptr [0] == '.')
{
tree const identifier
= get_identifier_with_length (type_string, ptr - type_string);
elt = build_tree_list (identifier, identifier);
TREE_CHAIN (elt) = list;
list = elt;
type_string = ptr+1;
i += 1;
}
}
elt = build_tree_list (type, get_identifier (type_string));
TREE_CHAIN (elt) = list;
list = elt;
TYPE_PACKAGE_LIST (type) = nreverse (list);
}
/* Add TYPE as the last element of the compression table. Resize the
compression table if necessary. */
static void
compression_table_add (tree type)
{
if (compression_next == TREE_VEC_LENGTH (compression_table))
{
tree new_table = make_tree_vec (2*compression_next);
int i;
for (i = 0; i < compression_next; i++)
TREE_VEC_ELT (new_table, i) = TREE_VEC_ELT (compression_table, i);
compression_table = new_table;
}
TREE_VEC_ELT (compression_table, compression_next++) = type;
}
/* Mangle an embedded resource file name. "_ZGr" is the prefix. A
'_' is prepended to the name so that names starting with a digit
can be demangled. The length and then the resulting name itself
are appended while escaping '$', '.', and '/' to: "$$", "$_", and
"$S". */
tree
java_mangle_resource_name (const char *name)
{
int len = strlen (name);
char *buf = (char *) alloca (2 * len + 1);
char *pos;
const unsigned char *w1 = (const unsigned char *) name;
const unsigned char *w2;
const unsigned char *limit = w1 + len;
pos = buf;
init_mangling ();
MANGLE_RAW_STRING ("Gr");
*pos++ = '_';
while (w1 < limit)
{
int ch;
w2 = w1;
ch = UTF8_GET (w1, limit);
gcc_assert (ch > 0);
switch (ch)
{
case '$':
*pos++ = '$';
*pos++ = '$';
break;
case '.':
*pos++ = '$';
*pos++ = '_';
break;
case '/':
*pos++ = '$';
*pos++ = 'S';
break;
default:
memcpy (pos, w2, w1 - w2);
pos += w1 - w2;
break;
}
}
append_gpp_mangled_name (buf, pos - buf);
return finish_mangling ();
}
/* Mangling initialization routine. */
static void
init_mangling (void)
{
if (!mangle_obstack)
{
mangle_obstack = &mangle_obstack_1;
gcc_obstack_init (mangle_obstack);
}
gcc_assert (compression_table == NULL);
compression_table = make_tree_vec (10);
/* Mangled name are to be suffixed */
MANGLE_RAW_STRING ("_Z");
}
/* Mangling finalization routine. The mangled name is returned as a
IDENTIFIER_NODE. */
static tree
finish_mangling (void)
{
tree result;
gcc_assert (compression_table);
compression_table = NULL_TREE;
compression_next = 0;
obstack_1grow (mangle_obstack, '\0');
result = get_identifier ((char *) obstack_base (mangle_obstack));
obstack_free (mangle_obstack, obstack_base (mangle_obstack));
return result;
}
#include "gt-java-mangle.h"

View File

@ -1,409 +0,0 @@
/* Shared functions related to mangling names for the GNU compiler
for the Java(TM) language.
Copyright (C) 2001-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
Java and all Java-based marks are trademarks or registered trademarks
of Sun Microsystems, Inc. in the United States and other countries.
The Free Software Foundation is independent of Sun Microsystems, Inc. */
/* Written by Alexandre Petit-Bianco <apbianco@cygnus.com> */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "obstack.h"
#include "diagnostic-core.h"
#include "jcf.h"
static void append_unicode_mangled_name (const char *, int);
#ifndef HAVE_AS_UTF8
static int unicode_mangling_length (const char *, int);
#endif
extern struct obstack *mangle_obstack;
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. If you change this, be sure
also to change the list in
libjava/classpath/tools/gnu/classpath/tools/javah/Keywords.java. */
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. */
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;
}
/* If NAME happens to be a C++ keyword, add `$'. */
#define MANGLE_CXX_KEYWORDS(NAME, LEN) \
do \
{ \
if (cxx_keyword_p ((NAME), (LEN))) \
{ \
char *tmp_buf = (char *)alloca ((LEN)+1); \
memcpy (tmp_buf, (NAME), (LEN)); \
tmp_buf[LEN]= '$'; \
(NAME) = tmp_buf; \
(LEN)++; \
} \
} \
while (0)
/* If the assembler doesn't support UTF8 in symbol names, some
characters might need to be escaped. */
#ifndef HAVE_AS_UTF8
/* Assuming (NAME, LEN) is a Utf8-encoding string, emit the string
appropriately mangled (with Unicode escapes if needed) to
MANGLE_OBSTACK. Note that `java', `lang' and `Object' are used so
frequently that they could be cached. */
void
append_gpp_mangled_name (const char *name, int len)
{
int encoded_len, needs_escapes;
/* Buffer large enough for INT_MIN. */
char buf[9];
MANGLE_CXX_KEYWORDS (name, len);
encoded_len = unicode_mangling_length (name, len);
needs_escapes = encoded_len > 0;
sprintf (buf, "%d", (needs_escapes ? encoded_len : len));
obstack_grow (mangle_obstack, buf, strlen (buf));
if (needs_escapes)
append_unicode_mangled_name (name, len);
else
obstack_grow (mangle_obstack, name, len);
}
/* Assuming (NAME, LEN) is a Utf8-encoded string, emit the string
appropriately mangled (with Unicode escapes) to MANGLE_OBSTACK.
Characters needing an escape are encoded `__UNN_' to `__UNNNN_', in
which case `__U' will be mangled `__U_'. */
static void
append_unicode_mangled_name (const char *name, int len)
{
const unsigned char *ptr;
const unsigned char *limit = (const unsigned char *)name + len;
int uuU = 0;
for (ptr = (const unsigned char *) name; ptr < limit; )
{
int ch = UTF8_GET(ptr, limit);
if ((ISALNUM (ch) && ch != 'U') || ch == '$')
{
obstack_1grow (mangle_obstack, ch);
uuU = 0;
}
/* Everything else needs encoding */
else
{
/* Buffer large enough for UINT_MAX plus the prefix. */
char buf [13];
if (ch == '_' || ch == 'U')
{
/* Prepare to recognize __U */
if (ch == '_' && (uuU < 3))
{
uuU++;
obstack_1grow (mangle_obstack, ch);
}
/* We recognize __U that we wish to encode
__U_. Finish the encoding. */
else if (ch == 'U' && (uuU == 2))
{
uuU = 0;
obstack_grow (mangle_obstack, "U_", 2);
}
/* Otherwise, just reset uuU and emit the character we
have. */
else
{
uuU = 0;
obstack_1grow (mangle_obstack, ch);
}
continue;
}
sprintf (buf, "__U%x_", ch);
obstack_grow (mangle_obstack, buf, strlen (buf));
uuU = 0;
}
}
}
/* Assuming (NAME, LEN) is a Utf8-encoding string, calculate the
length of the string as mangled (a la g++) including Unicode
escapes. If no escapes are needed, return 0. */
static int
unicode_mangling_length (const char *name, int len)
{
const unsigned char *ptr;
const unsigned char *limit = (const unsigned char *)name + len;
int need_escapes = 0; /* Whether we need an escape or not */
int num_chars = 0; /* Number of characters in the mangled name */
int uuU = 0; /* Help us to find __U. 0: '_', 1: '__' */
for (ptr = (const unsigned char *) name; ptr < limit; )
{
int ch = UTF8_GET(ptr, limit);
if (ch < 0)
error ("internal error - invalid Utf8 name");
if ((ISALNUM (ch) && ch != 'U') || ch == '$')
{
num_chars++;
uuU = 0;
}
/* Everything else needs encoding */
else
{
int encoding_length = 2;
if (ch == '_' || ch == 'U')
{
/* It's always at least one character. */
num_chars++;
/* Prepare to recognize __U */
if (ch == '_' && (uuU < 3))
uuU++;
/* We recognize __U that we wish to encode __U_, we
count one more character. */
else if (ch == 'U' && (uuU == 2))
{
num_chars++;
need_escapes = 1;
uuU = 0;
}
/* Otherwise, just reset uuU */
else
uuU = 0;
continue;
}
if (ch > 0xff)
encoding_length++;
if (ch > 0xfff)
encoding_length++;
num_chars += (4 + encoding_length);
need_escapes = 1;
uuU = 0;
}
}
if (need_escapes)
return num_chars;
else
return 0;
}
#else
/* The assembler supports UTF8, we don't use escapes. Mangling is
simply <N>NAME. <N> is the number of UTF8 encoded characters that
are found in NAME. Note that `java', `lang' and `Object' are used
so frequently that they could be cached. */
void
append_gpp_mangled_name (const char *name, int len)
{
const unsigned char *ptr;
const unsigned char *limit;
int encoded_len;
char buf [6];
MANGLE_CXX_KEYWORDS (name, len);
limit = (const unsigned char *)name + len;
/* Compute the length of the string we wish to mangle. */
for (encoded_len = 0, ptr = (const unsigned char *) name;
ptr < limit; encoded_len++)
{
int ch = UTF8_GET(ptr, limit);
if (ch < 0)
error ("internal error - invalid Utf8 name");
}
sprintf (buf, "%d", encoded_len);
obstack_grow (mangle_obstack, buf, strlen (buf));
obstack_grow (mangle_obstack, name, len);
}
#endif /* HAVE_AS_UTF8 */

View File

@ -1,70 +0,0 @@
/* Language parser definitions for the GNU compiler for the Java(TM) language.
Copyright (C) 1997-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
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_PARSE_H
#define GCC_JAVA_PARSE_H
/* Extern global variable declarations */
extern struct obstack temporary_obstack;
#ifdef VERBOSE_SKELETON
#undef SOURCE_FRONTEND_DEBUG
#define SOURCE_FRONTEND_DEBUG(X) \
{if (!quiet_flag) {printf ("* "); printf X; putchar ('\n');} }
#else
#define SOURCE_FRONTEND_DEBUG(X)
#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) \
&& (TREE_CODE ((TYPE)) == INTEGER_TYPE))
#define JNUMERIC_TYPE_P(TYPE) ((TYPE) \
&& (JFLOAT_TYPE_P ((TYPE)) \
|| JINTEGRAL_TYPE_P ((TYPE))))
#define JPRIMITIVE_TYPE_P(TYPE) ((TYPE) \
&& (JNUMERIC_TYPE_P ((TYPE)) \
|| TREE_CODE ((TYPE)) == BOOLEAN_TYPE))
/* 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 JREFERENCE_TYPE_P(TYPE) ((TYPE) \
&& (TREE_CODE (TYPE) == RECORD_TYPE \
|| (TREE_CODE (TYPE) == POINTER_TYPE \
&& TREE_CODE (TREE_TYPE (TYPE)) == \
RECORD_TYPE)))
int java_report_errors (void);
extern tree do_resolve_class (tree, tree, tree, tree, tree);
/* Always in use, no matter what you compile */
void java_push_parser_context (void);
void java_pop_parser_context (int);
extern void java_parser_context_save_global (void);
extern void java_parser_context_restore_global (void);
#endif /* ! GCC_JAVA_PARSE_H */

View File

@ -1,140 +0,0 @@
/* Functions related to building resource files.
Copyright (C) 1996-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
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. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "stringpool.h"
#include "cgraph.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "java-tree.h"
#include "toplev.h"
#include "tree-iterator.h"
/* A list of all the resources files. */
static GTY(()) vec<tree, va_gc> *resources;
void
compile_resource_data (const char *name, const char *buffer, int length)
{
tree rtype, field = NULL_TREE, data_type, rinit, data, decl;
vec<constructor_elt, va_gc> *v = NULL;
data_type = build_prim_array_type (unsigned_byte_type_node,
strlen (name) + length);
rtype = make_node (RECORD_TYPE);
PUSH_FIELD (input_location,
rtype, field, "name_length", unsigned_int_type_node);
PUSH_FIELD (input_location,
rtype, field, "resource_length", unsigned_int_type_node);
PUSH_FIELD (input_location, rtype, field, "data", data_type);
FINISH_RECORD (rtype);
START_RECORD_CONSTRUCTOR (v, rtype);
PUSH_FIELD_VALUE (v, "name_length",
build_int_cst (NULL_TREE, strlen (name)));
PUSH_FIELD_VALUE (v, "resource_length",
build_int_cst (NULL_TREE, length));
data = build_string (strlen(name) + length, buffer);
TREE_TYPE (data) = data_type;
PUSH_FIELD_VALUE (v, "data", data);
FINISH_RECORD_CONSTRUCTOR (rinit, v, rtype);
TREE_CONSTANT (rinit) = 1;
decl = build_decl (input_location,
VAR_DECL, java_mangle_resource_name (name), rtype);
TREE_STATIC (decl) = 1;
TREE_PUBLIC (decl) = 1;
java_hide_decl (decl);
DECL_ARTIFICIAL (decl) = 1;
DECL_IGNORED_P (decl) = 1;
TREE_READONLY (decl) = 1;
TREE_THIS_VOLATILE (decl) = 0;
DECL_INITIAL (decl) = rinit;
layout_decl (decl, 0);
pushdecl (decl);
rest_of_decl_compilation (decl, global_bindings_p (), 0);
varpool_node::finalize_decl (decl);
vec_safe_push (resources, decl);
}
void
write_resource_constructor (tree *list_p)
{
tree decl, t, register_resource_fn;
unsigned ix;
if (resources == NULL)
return;
t = build_function_type_list (void_type_node, ptr_type_node, NULL);
t = build_decl (input_location,
FUNCTION_DECL, get_identifier ("_Jv_RegisterResource"), t);
TREE_PUBLIC (t) = 1;
DECL_EXTERNAL (t) = 1;
register_resource_fn = t;
/* Write out entries in the same order in which they were defined. */
FOR_EACH_VEC_ELT (*resources, ix, decl)
{
t = build_fold_addr_expr (decl);
t = build_call_expr (register_resource_fn, 1, t);
append_to_statement_list (t, list_p);
}
}
/* Generate a byte array representing the contents of FILENAME. The
array is assigned a unique local symbol. The array represents a
compiled Java resource, which is accessed by the runtime using
NAME. */
void
compile_resource_file (const char *name, const char *filename)
{
struct stat stat_buf;
int fd;
char *buffer;
fd = open (filename, O_RDONLY | O_BINARY);
if (fd < 0)
{
perror ("Failed to read resource file");
return;
}
if (fstat (fd, &stat_buf) != 0
|| ! S_ISREG (stat_buf.st_mode))
{
perror ("Could not figure length of resource file");
return;
}
buffer = XNEWVEC (char, strlen (name) + stat_buf.st_size);
strcpy (buffer, name);
read (fd, buffer + strlen (name), stat_buf.st_size);
close (fd);
compile_resource_data (name, buffer, stat_buf.st_size);
}
#include "gt-java-resource.h"

View File

@ -1,826 +0,0 @@
/* Handle types for the GNU compiler for the Java(TM) language.
Copyright (C) 1996-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
Java and all Java-based marks are trademarks or registered trademarks
of Sun Microsystems, Inc. in the United States and other countries.
The Free Software Foundation is independent of Sun Microsystems, Inc. */
/* Written by Per Bothner <bothner@cygnus.com> */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "options.h"
#include "tree.h"
#include "stringpool.h"
#include "diagnostic-core.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "java-tree.h"
#include "convert.h"
static tree convert_ieee_real_to_integer (tree, tree);
static tree parse_signature_type (const unsigned char **,
const unsigned char *);
static tree lookup_do (tree, int, tree, tree, tree (*)(tree));
static tree build_null_signature (tree);
tree * type_map;
/* Set the type of the local variable with index SLOT to TYPE. */
void
set_local_type (int slot, tree type)
{
int max_locals = DECL_MAX_LOCALS(current_function_decl);
int nslots = TYPE_IS_WIDE (type) ? 2 : 1;
gcc_assert (slot >= 0 && (slot + nslots - 1 < max_locals));
type_map[slot] = type;
while (--nslots > 0)
type_map[++slot] = void_type_node;
}
/* Convert an IEEE real to an integer type. The result of such a
conversion when the source operand is a NaN isn't defined by
IEEE754, but by the Java language standard: it must be zero. Also,
overflows must be clipped to within range. This conversion
produces something like:
((expr >= (float)MAX_INT)
? MAX_INT
: ((expr <= (float)MIN_INT)
? MIN_INT
: ((expr != expr)
? 0
: (int)expr))) */
static tree
convert_ieee_real_to_integer (tree type, tree expr)
{
tree result;
expr = save_expr (expr);
result = fold_build3 (COND_EXPR, type,
fold_build2 (NE_EXPR, boolean_type_node, expr, expr),
convert (type, integer_zero_node),
convert_to_integer (type, expr));
result = fold_build3 (COND_EXPR, type,
fold_build2 (LE_EXPR, boolean_type_node, expr,
convert (TREE_TYPE (expr),
TYPE_MIN_VALUE (type))),
TYPE_MIN_VALUE (type),
result);
result = fold_build3 (COND_EXPR, type,
fold_build2 (GE_EXPR, boolean_type_node, expr,
convert (TREE_TYPE (expr),
TYPE_MAX_VALUE (type))),
TYPE_MAX_VALUE (type),
result);
return result;
}
/* Create an expression whose value is that of EXPR,
converted to type TYPE. The TREE_TYPE of the value
is always TYPE. This function implements all reasonable
conversions; callers should filter out those that are
not permitted by the language being compiled. */
tree
convert (tree type, tree expr)
{
enum tree_code code = TREE_CODE (type);
if (!expr)
return error_mark_node;
if (type == TREE_TYPE (expr)
|| TREE_CODE (expr) == ERROR_MARK)
return expr;
if (TREE_CODE (TREE_TYPE (expr)) == ERROR_MARK)
return error_mark_node;
if (code == VOID_TYPE)
return build1 (CONVERT_EXPR, type, expr);
if (code == BOOLEAN_TYPE)
return fold_convert (type, expr);
if (code == INTEGER_TYPE)
{
if (type == char_type_node || type == promoted_char_type_node)
return fold_convert (type, expr);
if ((really_constant_p (expr) || ! flag_unsafe_math_optimizations)
&& TREE_CODE (TREE_TYPE (expr)) == REAL_TYPE)
return convert_ieee_real_to_integer (type, expr);
else
{
/* fold very helpfully sets the overflow status if a type
overflows in a narrowing integer conversion, but Java
doesn't care. */
tree tmp = fold (convert_to_integer (type, expr));
if (TREE_CODE (tmp) == INTEGER_CST)
TREE_OVERFLOW (tmp) = 0;
return tmp;
}
}
if (code == REAL_TYPE)
return fold (convert_to_real (type, expr));
if (code == POINTER_TYPE)
return fold (convert_to_pointer (type, expr));
error ("conversion to non-scalar type requested");
return error_mark_node;
}
/* Return a data type that has machine mode MODE.
If the mode is an integer,
then UNSIGNEDP selects between signed and unsigned types. */
tree
java_type_for_mode (machine_mode mode, int unsignedp)
{
if (mode == TYPE_MODE (int_type_node))
return unsignedp ? unsigned_int_type_node : int_type_node;
if (mode == TYPE_MODE (long_type_node))
return unsignedp ? unsigned_long_type_node : long_type_node;
if (mode == TYPE_MODE (short_type_node))
return unsignedp ? unsigned_short_type_node : short_type_node;
if (mode == TYPE_MODE (byte_type_node))
return unsignedp ? unsigned_byte_type_node : byte_type_node;
if (mode == TYPE_MODE (float_type_node))
return float_type_node;
if (mode == TYPE_MODE (double_type_node))
return double_type_node;
return 0;
}
/* Return an integer type with BITS bits of precision,
that is unsigned if UNSIGNEDP is nonzero, otherwise signed. */
tree
java_type_for_size (unsigned bits, int unsignedp)
{
if (bits <= TYPE_PRECISION (byte_type_node))
return unsignedp ? unsigned_byte_type_node : byte_type_node;
if (bits <= TYPE_PRECISION (short_type_node))
return unsignedp ? unsigned_short_type_node : short_type_node;
if (bits <= TYPE_PRECISION (int_type_node))
return unsignedp ? unsigned_int_type_node : int_type_node;
if (bits <= TYPE_PRECISION (long_type_node))
return unsignedp ? unsigned_long_type_node : long_type_node;
return 0;
}
/* Thorough checking of the arrayness of TYPE. */
int
is_array_type_p (tree type)
{
return TREE_CODE (type) == POINTER_TYPE
&& TREE_CODE (TREE_TYPE (type)) == RECORD_TYPE
&& TYPE_ARRAY_P (TREE_TYPE (type));
}
/* Return the length of a Java array type.
Return -1 if the length is unknown or non-constant. */
HOST_WIDE_INT
java_array_type_length (tree array_type)
{
tree arfld;
if (TREE_CODE (array_type) == POINTER_TYPE)
array_type = TREE_TYPE (array_type);
arfld = DECL_CHAIN (DECL_CHAIN (TYPE_FIELDS (array_type)));
if (arfld != NULL_TREE)
{
tree index_type = TYPE_DOMAIN (TREE_TYPE (arfld));
if (index_type != NULL_TREE)
{
tree high = TYPE_MAX_VALUE (index_type);
if (TREE_CODE (high) == INTEGER_CST)
return TREE_INT_CST_LOW (high) + 1;
}
}
return -1;
}
/* An array of unknown length will be ultimately given a length of
-2, so that we can still have `length' producing a negative value
even if found. This was part of an optimization aiming at removing
`length' from static arrays. We could restore it, FIXME. */
tree
build_prim_array_type (tree element_type, HOST_WIDE_INT length)
{
tree index = NULL;
if (length != -1)
{
tree max_index = build_int_cst (sizetype, length - 1);
index = build_index_type (max_index);
}
return build_array_type (element_type, index);
}
/* Return a Java array type with a given ELEMENT_TYPE and LENGTH.
These are hashed (shared) using IDENTIFIER_SIGNATURE_TYPE.
The LENGTH is -1 if the length is unknown. */
tree
build_java_array_type (tree element_type, HOST_WIDE_INT length)
{
tree sig, t, fld, atype, arfld;
char buf[23];
tree elsig = build_java_signature (element_type);
tree el_name = element_type;
buf[0] = '[';
if (length >= 0)
sprintf (buf+1, HOST_WIDE_INT_PRINT_DEC, length);
else
buf[1] = '\0';
sig = ident_subst (IDENTIFIER_POINTER (elsig), IDENTIFIER_LENGTH (elsig),
buf, 0, 0, "");
t = IDENTIFIER_SIGNATURE_TYPE (sig);
if (t != NULL_TREE)
return TREE_TYPE (t);
t = make_class ();
IDENTIFIER_SIGNATURE_TYPE (sig) = build_pointer_type (t);
TYPE_ARRAY_P (t) = 1;
if (TREE_CODE (el_name) == POINTER_TYPE)
el_name = TREE_TYPE (el_name);
el_name = TYPE_NAME (el_name);
if (TREE_CODE (el_name) == TYPE_DECL)
el_name = DECL_NAME (el_name);
{
char suffix[23];
if (length >= 0)
sprintf (suffix, "[%d]", (int)length);
else
strcpy (suffix, "[]");
TYPE_NAME (t)
= TYPE_STUB_DECL (t)
= build_decl (input_location, TYPE_DECL,
identifier_subst (el_name, "", '.', '.', suffix),
t);
TYPE_DECL_SUPPRESS_DEBUG (TYPE_STUB_DECL (t)) = true;
}
set_java_signature (t, sig);
set_super_info (0, t, object_type_node, 0);
if (TREE_CODE (element_type) == RECORD_TYPE)
element_type = promote_type (element_type);
TYPE_ARRAY_ELEMENT (t) = element_type;
/* Add length pseudo-field. */
fld = build_decl (input_location,
FIELD_DECL, get_identifier ("length"), int_type_node);
TYPE_FIELDS (t) = fld;
DECL_CONTEXT (fld) = t;
FIELD_PUBLIC (fld) = 1;
FIELD_FINAL (fld) = 1;
TREE_READONLY (fld) = 1;
atype = build_prim_array_type (element_type, length);
arfld = build_decl (input_location,
FIELD_DECL, get_identifier ("data"), atype);
DECL_CONTEXT (arfld) = t;
DECL_CHAIN (fld) = arfld;
SET_DECL_ALIGN (arfld, TYPE_ALIGN (element_type));
/* We could layout_class, but that loads java.lang.Object prematurely.
* This is called by the parser, and it is a bad idea to do load_class
* in the middle of parsing, because of possible circularity problems. */
push_super_field (t, object_type_node);
layout_type (t);
return t;
}
/* Promote TYPE to the type actually used for fields and parameters. */
tree
promote_type (tree type)
{
switch (TREE_CODE (type))
{
case RECORD_TYPE:
return build_pointer_type (type);
case BOOLEAN_TYPE:
if (type == boolean_type_node)
return promoted_boolean_type_node;
goto handle_int;
case INTEGER_TYPE:
if (type == char_type_node)
return promoted_char_type_node;
handle_int:
if (TYPE_PRECISION (type) < TYPE_PRECISION (int_type_node))
{
if (type == short_type_node)
return promoted_short_type_node;
if (type == byte_type_node)
return promoted_byte_type_node;
return int_type_node;
}
/* fall through */
default:
return type;
}
}
/* Parse a signature string, starting at *PTR and ending at LIMIT.
Return the seen TREE_TYPE, updating *PTR. */
static tree
parse_signature_type (const unsigned char **ptr, const unsigned char *limit)
{
tree type;
gcc_assert (*ptr < limit);
switch (**ptr)
{
case 'B': (*ptr)++; return byte_type_node;
case 'C': (*ptr)++; return char_type_node;
case 'D': (*ptr)++; return double_type_node;
case 'F': (*ptr)++; return float_type_node;
case 'S': (*ptr)++; return short_type_node;
case 'I': (*ptr)++; return int_type_node;
case 'J': (*ptr)++; return long_type_node;
case 'Z': (*ptr)++; return boolean_type_node;
case 'V': (*ptr)++; return void_type_node;
case '[':
for ((*ptr)++; (*ptr) < limit && ISDIGIT (**ptr); ) (*ptr)++;
type = parse_signature_type (ptr, limit);
type = build_java_array_type (type, -1);
break;
case 'L':
{
const unsigned char *start = ++(*ptr);
const unsigned char *str = start;
for ( ; ; str++)
{
gcc_assert (str < limit);
if (*str == ';')
break;
}
*ptr = str+1;
type = lookup_class (unmangle_classname ((const char *) start, str - start));
break;
}
default:
gcc_unreachable ();
}
return promote_type (type);
}
/* Parse a Java "mangled" signature string, starting at SIG_STRING,
and SIG_LENGTH bytes long.
Return a gcc type node. */
tree
parse_signature_string (const unsigned char *sig_string, int sig_length)
{
tree result_type;
const unsigned char *str = sig_string;
const unsigned char *limit = str + sig_length;
if (str < limit && str[0] == '(')
{
tree argtype_list = NULL_TREE;
str++;
while (str < limit && str[0] != ')')
{
tree argtype = parse_signature_type (&str, limit);
argtype_list = tree_cons (NULL_TREE, argtype, argtype_list);
}
if (str++, str >= limit)
abort ();
result_type = parse_signature_type (&str, limit);
argtype_list = chainon (nreverse (argtype_list), end_params_node);
result_type = build_function_type (result_type, argtype_list);
}
else
result_type = parse_signature_type (&str, limit);
if (str != limit)
error ("junk at end of signature string");
return result_type;
}
/* Convert a signature to its type.
* Uses IDENTIFIER_SIGNATURE_TYPE as a cache (except for primitive types).
*/
tree
get_type_from_signature (tree signature)
{
const unsigned char *sig = (const unsigned char *) IDENTIFIER_POINTER (signature);
int len = IDENTIFIER_LENGTH (signature);
tree type;
/* Primitive types aren't cached. */
if (len <= 1)
return parse_signature_string (sig, len);
type = IDENTIFIER_SIGNATURE_TYPE (signature);
if (type == NULL_TREE)
{
type = parse_signature_string (sig, len);
IDENTIFIER_SIGNATURE_TYPE (signature) = type;
}
return type;
}
/* Ignore signature and always return null. Used by has_method. */
static tree
build_null_signature (tree type ATTRIBUTE_UNUSED)
{
return NULL_TREE;
}
/* Return the signature string for the arguments of method type TYPE. */
tree
build_java_argument_signature (tree type)
{
extern struct obstack temporary_obstack;
tree sig = TYPE_ARGUMENT_SIGNATURE (type);
if (sig == NULL_TREE)
{
tree args = TYPE_ARG_TYPES (type);
if (TREE_CODE (type) == METHOD_TYPE)
args = TREE_CHAIN (args); /* Skip "this" argument. */
for (; args != end_params_node; args = TREE_CHAIN (args))
{
tree t = build_java_signature (TREE_VALUE (args));
obstack_grow (&temporary_obstack,
IDENTIFIER_POINTER (t), IDENTIFIER_LENGTH (t));
}
obstack_1grow (&temporary_obstack, '\0');
sig = get_identifier ((char *) obstack_base (&temporary_obstack));
TYPE_ARGUMENT_SIGNATURE (type) = sig;
obstack_free (&temporary_obstack, obstack_base (&temporary_obstack));
}
return sig;
}
/* Return the signature of the given TYPE. */
tree
build_java_signature (tree type)
{
tree sig, t;
while (TREE_CODE (type) == POINTER_TYPE)
type = TREE_TYPE (type);
MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC (type);
sig = TYPE_SIGNATURE (type);
if (sig == NULL_TREE)
{
char sg[2];
switch (TREE_CODE (type))
{
case BOOLEAN_TYPE: sg[0] = 'Z'; goto native;
case VOID_TYPE: sg[0] = 'V'; goto native;
case INTEGER_TYPE:
if (type == char_type_node || type == promoted_char_type_node)
{
sg[0] = 'C';
goto native;
}
switch (TYPE_PRECISION (type))
{
case 8: sg[0] = 'B'; goto native;
case 16: sg[0] = 'S'; goto native;
case 32: sg[0] = 'I'; goto native;
case 64: sg[0] = 'J'; goto native;
default: goto bad_type;
}
case REAL_TYPE:
switch (TYPE_PRECISION (type))
{
case 32: sg[0] = 'F'; goto native;
case 64: sg[0] = 'D'; goto native;
default: goto bad_type;
}
native:
sg[1] = 0;
sig = get_identifier (sg);
break;
case RECORD_TYPE:
if (TYPE_ARRAY_P (type))
{
t = build_java_signature (TYPE_ARRAY_ELEMENT (type));
sig = ident_subst (IDENTIFIER_POINTER (t), IDENTIFIER_LENGTH (t),
"[", 0, 0, "");
}
else
{
t = DECL_NAME (TYPE_NAME (type));
sig = ident_subst (IDENTIFIER_POINTER (t), IDENTIFIER_LENGTH (t),
"L", '.', '/', ";");
}
break;
case METHOD_TYPE:
case FUNCTION_TYPE:
{
extern struct obstack temporary_obstack;
sig = build_java_argument_signature (type);
obstack_1grow (&temporary_obstack, '(');
obstack_grow (&temporary_obstack,
IDENTIFIER_POINTER (sig), IDENTIFIER_LENGTH (sig));
obstack_1grow (&temporary_obstack, ')');
t = build_java_signature (TREE_TYPE (type));
obstack_grow0 (&temporary_obstack,
IDENTIFIER_POINTER (t), IDENTIFIER_LENGTH (t));
sig = get_identifier ((char *) obstack_base (&temporary_obstack));
obstack_free (&temporary_obstack,
obstack_base (&temporary_obstack));
}
break;
bad_type:
default:
gcc_unreachable ();
}
TYPE_SIGNATURE (type) = sig;
}
return sig;
}
/* Save signature string SIG (an IDENTIFIER_NODE) in TYPE for future use. */
void
set_java_signature (tree type, tree sig)
{
tree old_sig;
while (TREE_CODE (type) == POINTER_TYPE)
type = TREE_TYPE (type);
MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC (type);
old_sig = TYPE_SIGNATURE (type);
if (old_sig != NULL_TREE && old_sig != sig)
abort ();
TYPE_SIGNATURE (type) = sig;
#if 0 /* careful about METHOD_TYPE */
if (IDENTIFIER_SIGNATURE_TYPE (sig) == NULL_TREE && TREE_PERMANENT (type))
IDENTIFIER_SIGNATURE_TYPE (sig) = type;
#endif
}
/* Search in SEARCHED_CLASS and its superclasses for a method matching
METHOD_NAME and signature METHOD_SIGNATURE. This function will
only search for methods declared in the class hierarchy; interfaces
will not be considered. Returns NULL_TREE if the method is not
found. */
tree
lookup_argument_method (tree searched_class, tree method_name,
tree method_signature)
{
return lookup_do (searched_class, 0,
method_name, method_signature,
build_java_argument_signature);
}
/* Like lookup_argument_method, but lets the caller set any flags
desired. */
tree
lookup_argument_method_generic (tree searched_class, tree method_name,
tree method_signature, int flags)
{
return lookup_do (searched_class, flags,
method_name, method_signature,
build_java_argument_signature);
}
/* Search in class SEARCHED_CLASS (and its superclasses) for a method
matching METHOD_NAME and signature METHOD_SIGNATURE. Return a
FUNCTION_DECL on success, or NULL_TREE if none found. (Contrast
lookup_argument_method, which ignores return type.) If
SEARCHED_CLASS is an interface, search it too. */
tree
lookup_java_method (tree searched_class, tree method_name,
tree method_signature)
{
return lookup_do (searched_class, SEARCH_INTERFACE, method_name,
method_signature, build_java_signature);
}
/* Return true iff KLASS (or its ancestors) has a method METHOD_NAME.  */
int
has_method (tree klass, tree method_name)
{
return lookup_do (klass, SEARCH_INTERFACE,
method_name, NULL_TREE,
build_null_signature) != NULL_TREE;
}
/* Search in class SEARCHED_CLASS, but not its superclasses, for a
method matching METHOD_NAME and signature SIGNATURE. A private
helper for lookup_do. */
static tree
shallow_find_method (tree searched_class, int flags, tree method_name,
tree signature, tree (*signature_builder) (tree))
{
tree method;
for (method = TYPE_METHODS (searched_class);
method != NULL_TREE; method = DECL_CHAIN (method))
{
tree method_sig = (*signature_builder) (TREE_TYPE (method));
if (DECL_NAME (method) == method_name && method_sig == signature)
{
/* If the caller requires a visible method, then we
skip invisible methods here. */
if (! (flags & SEARCH_VISIBLE)
|| ! METHOD_INVISIBLE (method))
return method;
}
}
return NULL_TREE;
}
/* Search in the superclasses of SEARCHED_CLASS for a method matching
METHOD_NAME and signature SIGNATURE. A private helper for
lookup_do. */
static tree
find_method_in_superclasses (tree searched_class, int flags,
tree method_name, tree signature,
tree (*signature_builder) (tree))
{
tree klass;
for (klass = CLASSTYPE_SUPER (searched_class); klass != NULL_TREE;
klass = CLASSTYPE_SUPER (klass))
{
tree method;
method = shallow_find_method (klass, flags, method_name,
signature, signature_builder);
if (method != NULL_TREE)
return method;
}
return NULL_TREE;
}
/* Search in the interfaces of SEARCHED_CLASS and its superinterfaces
for a method matching METHOD_NAME and signature SIGNATURE. A
private helper for lookup_do. */
static tree
find_method_in_interfaces (tree searched_class, int flags, tree method_name,
tree signature, tree (*signature_builder) (tree))
{
int i;
tree binfo, base_binfo;
for (binfo = TYPE_BINFO (searched_class), i = 1;
BINFO_BASE_ITERATE (binfo, i, base_binfo); i++)
{
tree iclass = BINFO_TYPE (base_binfo);
tree method;
/* If the superinterface hasn't been loaded yet, do so now. */
if (!CLASS_LOADED_P (iclass))
load_class (iclass, 1);
/* First, we look in ICLASS. If that doesn't work we'll
recursively look through all its superinterfaces. */
method = shallow_find_method (iclass, flags, method_name,
signature, signature_builder);
if (method != NULL_TREE)
return method;
method = find_method_in_interfaces
(iclass, flags, method_name, signature, signature_builder);
if (method != NULL_TREE)
return method;
}
return NULL_TREE;
}
/* Search in class SEARCHED_CLASS (and its superclasses) for a method
matching METHOD_NAME and signature SIGNATURE. FLAGS control some
parameters of the search.
SEARCH_INTERFACE means also search interfaces and superinterfaces
of SEARCHED_CLASS.
SEARCH_SUPER means skip SEARCHED_CLASS and start with its
superclass.
SEARCH_VISIBLE means skip methods for which METHOD_INVISIBLE is
set.
Return the matched method DECL or NULL_TREE. SIGNATURE_BUILDER is
used on method candidates to build their (sometimes partial)
signature. */
static tree
lookup_do (tree searched_class, int flags, tree method_name,
tree signature, tree (*signature_builder) (tree))
{
tree method;
tree orig_class = searched_class;
if (searched_class == NULL_TREE)
return NULL_TREE;
if (flags & SEARCH_SUPER)
{
searched_class = CLASSTYPE_SUPER (searched_class);
if (searched_class == NULL_TREE)
return NULL_TREE;
}
/* First look in our own methods. */
method = shallow_find_method (searched_class, flags, method_name,
signature, signature_builder);
if (method)
return method;
/* Then look in our superclasses. */
if (! CLASS_INTERFACE (TYPE_NAME (searched_class)))
method = find_method_in_superclasses (searched_class, flags, method_name,
signature, signature_builder);
if (method)
return method;
/* If that doesn't work, look in our interfaces. */
if (flags & SEARCH_INTERFACE)
method = find_method_in_interfaces (orig_class, flags, method_name,
signature, signature_builder);
return method;
}
/* Search in class CLAS for a constructor matching METHOD_SIGNATURE.
Return a FUNCTION_DECL on success, or NULL_TREE if none found. */
tree
lookup_java_constructor (tree clas, tree method_signature)
{
tree method = TYPE_METHODS (clas);
for ( ; method != NULL_TREE; method = DECL_CHAIN (method))
{
tree method_sig = build_java_signature (TREE_TYPE (method));
if (DECL_CONSTRUCTOR_P (method) && method_sig == method_signature)
return method;
}
return NULL_TREE;
}
/* Return a type which is the Binary Numeric Promotion of the pair T1,
T2 and convert EXP1 and/or EXP2. See 5.6.2 Binary Numeric
Promotion. It assumes that both T1 and T2 are eligible to BNP. */
tree
binary_numeric_promotion (tree t1, tree t2, tree *exp1, tree *exp2)
{
if (t1 == double_type_node || t2 == double_type_node)
{
if (t1 != double_type_node)
*exp1 = convert (double_type_node, *exp1);
if (t2 != double_type_node)
*exp2 = convert (double_type_node, *exp2);
return double_type_node;
}
if (t1 == float_type_node || t2 == float_type_node)
{
if (t1 != float_type_node)
*exp1 = convert (float_type_node, *exp1);
if (t2 != float_type_node)
*exp2 = convert (float_type_node, *exp2);
return float_type_node;
}
if (t1 == long_type_node || t2 == long_type_node)
{
if (t1 != long_type_node)
*exp1 = convert (long_type_node, *exp1);
if (t2 != long_type_node)
*exp2 = convert (long_type_node, *exp2);
return long_type_node;
}
if (t1 != int_type_node)
*exp1 = convert (int_type_node, *exp1);
if (t2 != int_type_node)
*exp2 = convert (int_type_node, *exp2);
return int_type_node;
}

View File

@ -1,502 +0,0 @@
/* Glue to interface gcj with bytecode verifier.
Copyright (C) 2003-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
Java and all Java-based marks are trademarks or registered trademarks
of Sun Microsystems, Inc. in the United States and other countries.
The Free Software Foundation is independent of Sun Microsystems, Inc. */
/* Written by Tom Tromey <tromey@redhat.com>. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "options.h"
#include "stringpool.h"
#include "diagnostic-core.h"
#include "parse.h"
#include "verify.h"
#include "java-except.h"
void *
vfy_alloc (size_t bytes)
{
return xmalloc (bytes);
}
void
vfy_free (void *mem)
{
free (mem);
}
bool
vfy_strings_equal (vfy_string one, vfy_string two)
{
return one == two;
}
const char *
vfy_string_bytes (vfy_string str)
{
return IDENTIFIER_POINTER (str);
}
int
vfy_string_length (vfy_string str)
{
return IDENTIFIER_LENGTH (str);
}
vfy_string
vfy_init_name (void)
{
return init_identifier_node;
}
vfy_string
vfy_clinit_name (void)
{
return clinit_identifier_node;
}
static const char*
skip_one_type (const char* ptr)
{
int ch = *ptr++;
while (ch == '[')
{
ch = *ptr++;
}
if (ch == 'L')
{
do { ch = *ptr++; } while (ch != ';');
}
return ptr;
}
int
vfy_count_arguments (vfy_string signature)
{
const char *ptr = IDENTIFIER_POINTER (signature);
int arg_count = 0;
/* Skip '('. */
ptr++;
/* Count args. */
while (*ptr != ')')
{
ptr = skip_one_type (ptr);
arg_count += 1;
}
return arg_count;
}
vfy_string
vfy_get_string (const char *s, int len)
{
return get_identifier_with_length (s, len);
}
vfy_string
vfy_get_signature (vfy_method *method)
{
return method->signature;
}
vfy_string
vfy_get_method_name (vfy_method *method)
{
return method->name;
}
bool
vfy_is_static (vfy_method *method)
{
return METHOD_STATIC (method->method);
}
const unsigned char *
vfy_get_bytecode (vfy_method *method)
{
return method->bytes;
}
vfy_exception *
vfy_get_exceptions (vfy_method *method)
{
return method->exceptions;
}
void
vfy_get_exception (vfy_exception *exceptions, int index, int *handler,
int *start, int *end, int *handler_type)
{
*handler = exceptions[index].handler;
*start = exceptions[index].start;
*end = exceptions[index].end;
*handler_type = exceptions[index].type;
}
int
vfy_tag (vfy_constants *pool, int index)
{
int result = JPOOL_TAG (pool, index);
/* gcj will resolve constant pool entries other than string and
class references. The verifier doesn't care about the values, so
we just strip off the resolved flag. */
if ((result & CONSTANT_ResolvedFlag) != 0
&& result != CONSTANT_ResolvedString
&& result != CONSTANT_ResolvedClass)
result &= ~ CONSTANT_ResolvedFlag;
return result;
}
void
vfy_load_indexes (vfy_constants *pool, int index,
vfy_uint_16 *index0, vfy_uint_16 *index1)
{
*index0 = JPOOL_USHORT1 (pool, index);
*index1 = JPOOL_USHORT2 (pool, index);
}
vfy_constants *
vfy_get_constants (vfy_jclass klass)
{
return TYPE_JCF (klass);
}
int
vfy_get_constants_size (vfy_jclass klass)
{
return JPOOL_SIZE (TYPE_JCF (klass));
}
vfy_string
vfy_get_pool_string (vfy_constants *pool, int index)
{
return get_name_constant (pool, index);
}
vfy_jclass
vfy_get_pool_class (vfy_constants *pool, int index)
{
vfy_jclass k;
k = get_class_constant (pool, index);
return k;
}
vfy_string
vfy_get_class_name (vfy_jclass klass)
{
return DECL_NAME (TYPE_NAME (klass));
}
bool
vfy_is_assignable_from (vfy_jclass target, vfy_jclass source)
{
/* Any class is always assignable to itself, or java.lang.Object. */
if (source == target || target == object_type_node)
return true;
/* For the C++ ABI, perform this test statically. */
if (! flag_indirect_dispatch)
return can_widen_reference_to (source, target);
/* For the BC-ABI, we assume at compile time that reference types are always
compatible. However, a type assertion table entry is emitted so that the
runtime can detect binary-incompatible changes. */
add_type_assertion (current_class, JV_ASSERT_TYPES_COMPATIBLE, source,
target);
return true;
}
char
vfy_get_primitive_char (vfy_jclass klass)
{
tree sig;
gcc_assert (vfy_is_primitive (klass));
sig = build_java_signature (klass);
return (IDENTIFIER_POINTER (sig))[0];
}
bool
vfy_is_array (vfy_jclass klass)
{
return TYPE_ARRAY_P (klass);
}
bool
vfy_is_interface (vfy_jclass klass)
{
return CLASS_INTERFACE (TYPE_NAME (klass));
}
bool
vfy_is_primitive (vfy_jclass klass)
{
return JPRIMITIVE_TYPE_P (klass);
}
vfy_jclass
vfy_get_superclass (vfy_jclass klass)
{
vfy_jclass k;
k = CLASSTYPE_SUPER (klass);
return k;
}
vfy_jclass
vfy_get_array_class (vfy_jclass klass)
{
vfy_jclass k;
k = build_java_array_type (klass, -1);
return k;
}
vfy_jclass
vfy_get_component_type (vfy_jclass klass)
{
vfy_jclass k;
gcc_assert (vfy_is_array (klass));
k = TYPE_ARRAY_ELEMENT (klass);
if (TREE_CODE (k) == POINTER_TYPE)
k = TREE_TYPE (k);
return k;
}
bool
vfy_is_abstract (vfy_jclass klass)
{
return CLASS_ABSTRACT (TYPE_NAME (klass));
}
vfy_jclass
vfy_find_class (vfy_jclass ignore ATTRIBUTE_UNUSED, vfy_string name)
{
vfy_jclass k;
k = get_type_from_signature (name);
if (TREE_CODE (k) == POINTER_TYPE)
k = TREE_TYPE (k);
return k;
}
vfy_jclass
vfy_object_type (void)
{
vfy_jclass k;
k = object_type_node;
return k;
}
vfy_jclass
vfy_class_type (void)
{
return class_type_node;
}
vfy_jclass
vfy_string_type (void)
{
vfy_jclass k;
k = string_type_node;
return k;
}
vfy_jclass
vfy_throwable_type (void)
{
vfy_jclass k;
k = throwable_type_node;
return k;
}
vfy_jclass
vfy_unsuitable_type (void)
{
return TYPE_SECOND;
}
vfy_jclass
vfy_return_address_type (void)
{
return TYPE_RETURN_ADDR;
}
vfy_jclass
vfy_null_type (void)
{
return TYPE_NULL;
}
bool
vfy_class_has_field (vfy_jclass klass, vfy_string name,
vfy_string signature)
{
tree field = TYPE_FIELDS (klass);
while (field != NULL_TREE)
{
if (DECL_NAME (field) == name
&& build_java_signature (TREE_TYPE (field)) == signature)
return true;
field = DECL_CHAIN (field);
}
return false;
}
int
vfy_fail (const char *message, int pc, vfy_jclass ignore1 ATTRIBUTE_UNUSED,
vfy_method *ignore2 ATTRIBUTE_UNUSED)
{
if (pc == -1)
error ("verification failed: %s", message);
else
error ("verification failed at PC=%d: %s", pc, message);
/* We have to return a value for the verifier to throw. */
return 1;
}
vfy_jclass
vfy_get_primitive_type (int type)
{
vfy_jclass k;
k = decode_newarray_type (type);
return k;
}
void
vfy_note_stack_depth (vfy_method *method, int pc, int depth)
{
tree val = make_tree_vec (method->max_locals + depth);
(*type_states)[pc] = val;
/* Called for side effects. */
lookup_label (pc);
}
void
vfy_note_stack_type (vfy_method *method, int pc, int slot, vfy_jclass type)
{
tree vec;
slot += method->max_locals;
if (type == object_type_node)
type = object_ptr_type_node;
vec = (*type_states)[pc];
TREE_VEC_ELT (vec, slot) = type;
/* Called for side effects. */
lookup_label (pc);
}
void
vfy_note_local_type (vfy_method *method ATTRIBUTE_UNUSED, int pc, int slot,
vfy_jclass type)
{
tree vec;
if (type == object_type_node)
type = object_ptr_type_node;
vec = (*type_states)[pc];
TREE_VEC_ELT (vec, slot) = type;
/* Called for side effects. */
lookup_label (pc);
}
void
vfy_note_instruction_seen (int pc)
{
instruction_bits[pc] |= BCODE_VERIFIED;
}
/* Verify the bytecodes of the current method.
Return 1 on success, 0 on failure. */
int
verify_jvm_instructions_new (JCF *jcf, const unsigned char *byte_ops,
long length)
{
vfy_method method;
int i, result, eh_count;
vfy_exception *exceptions;
method_init_exceptions ();
JCF_SEEK (jcf, DECL_CODE_OFFSET (current_function_decl) + length);
eh_count = JCF_readu2 (jcf);
exceptions = (vfy_exception *) xmalloc (eh_count * sizeof (vfy_exception));
for (i = 0; i < eh_count; ++i)
{
int start_pc, end_pc, handler_pc, catch_type;
unsigned char *p = jcf->read_ptr + 8 * i;
start_pc = GET_u2 (p);
end_pc = GET_u2 (p+2);
handler_pc = GET_u2 (p+4);
catch_type = GET_u2 (p+6);
if (start_pc < 0 || start_pc >= length
|| end_pc < 0 || end_pc > length || start_pc >= end_pc
|| handler_pc < 0 || handler_pc >= length)
{
error ("bad pc in exception_table");
free (exceptions);
return 0;
}
exceptions[i].handler = handler_pc;
exceptions[i].start = start_pc;
exceptions[i].end = end_pc;
exceptions[i].type = catch_type;
add_handler (start_pc, end_pc,
lookup_label (handler_pc),
catch_type == 0 ? NULL_TREE
: get_class_constant (jcf, catch_type));
instruction_bits[handler_pc] |= BCODE_EXCEPTION_TARGET;
}
gcc_assert (sanity_check_exception_range (&whole_range));
method.method = current_function_decl;
method.signature = build_java_signature (TREE_TYPE (current_function_decl));
method.name = DECL_NAME (current_function_decl);
method.bytes = byte_ops;
method.exceptions = exceptions;
method.defining_class = DECL_CONTEXT (current_function_decl);
method.max_stack = DECL_MAX_STACK (current_function_decl);
method.max_locals = DECL_MAX_LOCALS (current_function_decl);
method.code_length = length;
method.exc_count = eh_count;
result = verify_method (&method);
free (exceptions);
return result;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,151 +0,0 @@
/* Declarations to interface gcj with bytecode verifier.
Copyright (C) 2003-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
Java and all Java-based marks are trademarks or registered trademarks
of Sun Microsystems, Inc. in the United States and other countries.
The Free Software Foundation is independent of Sun Microsystems, Inc. */
/* Written by Tom Tromey <tromey@redhat.com>. */
#ifndef GCC_VERIFY_H
#define GCC_VERIFY_H
#include "jcf.h"
#include "tree.h"
#include "java-tree.h"
typedef JCF vfy_constants;
/* For our purposes a string is the same as an identifier. */
typedef tree vfy_string;
/* The TYPE_DECL for a class or primitive type. */
typedef tree vfy_jclass;
/* An unsigned jshort. */
typedef uint16 vfy_uint_16;
typedef struct
{
int handler, start, end, type;
} vfy_exception;
typedef struct
{
tree method;
vfy_string signature;
vfy_string name;
const unsigned char *bytes;
vfy_exception *exceptions;
/* These fields are referred to directly by the verifier. */
vfy_jclass defining_class;
int max_stack;
int max_locals;
int code_length;
int exc_count;
} vfy_method;
/* Entry point to the verifier. */
int verify_jvm_instructions_new (JCF *jcf, const unsigned char *byte_ops,
long length);
void *vfy_alloc (size_t bytes);
void vfy_free (void *mem);
bool vfy_strings_equal (vfy_string one, vfy_string two);
const char *vfy_string_bytes (vfy_string str);
int vfy_string_length (vfy_string str);
vfy_string vfy_get_string (const char *chars, int length);
vfy_string vfy_init_name (void);
vfy_string vfy_clinit_name (void);
int vfy_count_arguments (vfy_string signature);
vfy_string vfy_get_signature (vfy_method *method);
vfy_string vfy_get_method_name (vfy_method *method);
bool vfy_is_static (vfy_method *method);
const unsigned char *vfy_get_bytecode (vfy_method *method);
vfy_exception *vfy_get_exceptions (vfy_method *method);
void vfy_get_exception (vfy_exception *, int index, int *handler,
int *start, int *end, int *handler_type);
int vfy_tag (vfy_constants *pool, int index);
void vfy_load_indexes (vfy_constants *pool, int index,
vfy_uint_16 *index0, vfy_uint_16 *index1);
vfy_constants *vfy_get_constants (vfy_jclass klass);
int vfy_get_constants_size (vfy_jclass klass);
vfy_string vfy_get_pool_string (vfy_constants *pool, int index);
vfy_jclass vfy_get_pool_class (vfy_constants *pool, int index);
vfy_string vfy_get_class_name (vfy_jclass klass);
bool vfy_is_assignable_from (vfy_jclass target, vfy_jclass source);
char vfy_get_primitive_char (vfy_jclass klass);
int vfy_get_interface_count (vfy_jclass klass);
vfy_jclass vfy_get_interface (vfy_jclass klass, int index);
bool vfy_is_array (vfy_jclass klass);
bool vfy_is_interface (vfy_jclass klass);
bool vfy_is_primitive (vfy_jclass klass);
vfy_jclass vfy_get_superclass (vfy_jclass klass);
vfy_jclass vfy_get_array_class (vfy_jclass klass);
vfy_jclass vfy_get_component_type (vfy_jclass klass);
bool vfy_is_abstract (vfy_jclass klass);
vfy_jclass vfy_find_class (vfy_jclass klass, vfy_string name);
vfy_jclass vfy_object_type (void);
vfy_jclass vfy_class_type (void);
vfy_jclass vfy_string_type (void);
vfy_jclass vfy_throwable_type (void);
vfy_jclass vfy_unsuitable_type (void);
vfy_jclass vfy_return_address_type (void);
vfy_jclass vfy_null_type (void);
int vfy_fail (const char *message, int pc, vfy_jclass ignore1,
vfy_method *method);
vfy_jclass vfy_get_primitive_type (int type);
void vfy_note_stack_depth (vfy_method *method, int pc, int depth);
void vfy_note_stack_type (vfy_method *method, int pc, int slot,
vfy_jclass type);
void vfy_note_local_type (vfy_method *method, int pc, int slot,
vfy_jclass type);
void vfy_note_instruction_seen (int pc);
bool vfy_class_has_field (vfy_jclass klass, vfy_string name,
vfy_string signature);
#define GLOM(name, stuff) name ## stuff
#define VFY_PRIMITIVE_CLASS(name) \
vfy_get_primitive_type ((int) (GLOM (name, _type)))
typedef enum
{
#define JAVAOP(name, num, ignore1, ignore2, ignore3) \
GLOM (op_, name) = num,
#include "javaop.def"
java_opcode_end
} java_opcode;
#define JV_CONSTANT_Class CONSTANT_Class
#define JV_CONSTANT_ResolvedClass CONSTANT_ResolvedClass
#define JV_CONSTANT_String CONSTANT_String
#define JV_CONSTANT_ResolvedString CONSTANT_ResolvedString
#define JV_CONSTANT_Integer CONSTANT_Integer
#define JV_CONSTANT_Float CONSTANT_Float
#define JV_CONSTANT_Long CONSTANT_Long
#define JV_CONSTANT_Double CONSTANT_Double
#define JV_CONSTANT_Fieldref CONSTANT_Fieldref
#define JV_CONSTANT_InterfaceMethodref CONSTANT_InterfaceMethodref
#define JV_CONSTANT_Methodref CONSTANT_Methodref
int verify_method (vfy_method *meth);
#endif /* ! GCC_VERIFY_H */

View File

@ -1,87 +0,0 @@
/* Platform-Specific Win32 Functions
Copyright (C) 2003-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
Java and all Java-based marks are trademarks or registered trademarks
of Sun Microsystems, Inc. in the United States and other countries.
The Free Software Foundation is independent of Sun Microsystems, Inc. */
/* Written by Mohan Embar <gnustuff@thisiscool.com>, March 2003. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "jcf.h"
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
/* Simulate an open() failure with ENOENT */
static int
file_not_found (void);
static int
file_not_found (void)
{
errno = ENOENT;
return -1;
}
int
jcf_open_exact_case (const char *filename, int oflag)
{
int filename_len = strlen (filename);
int found_file_len;
HANDLE found_file_handle;
WIN32_FIND_DATA fd;
/* See if we can find this file. */
found_file_handle = FindFirstFile (filename, &fd);
if (found_file_handle == INVALID_HANDLE_VALUE)
return file_not_found ();
FindClose (found_file_handle);
found_file_len = strlen (fd.cFileName);
/* This should never happen. */
if (found_file_len > filename_len)
return file_not_found ();
/* Here, we're only actually comparing the filename and not
checking the case of any containing directory components.
Although we're not fully obeying our contract, checking
all directory components would be tedious and time-consuming
and it's a pretty safe assumption that mixed-case package
names are a fringe case.... */
if (filename_cmp (filename + filename_len - found_file_len, fd.cFileName))
{
/* Reject this because it is not a perfect-case match. */
/* printf("************\nRejected:\n%s\n%s\n************\n\n", filename, fd.cFileName); */
return file_not_found ();
}
else
{
return open (filename, oflag);
}
}
#endif /* WIN32 */

View File

@ -1,394 +0,0 @@
/* Handle a .class file embedded in a .zip archive.
This extracts a member from a .zip file, but does not handle
uncompression (since that is not needed for classes.zip).
Copyright (C) 1996-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
Java and all Java-based marks are trademarks or registered trademarks
of Sun Microsystems, Inc. in the United States and other countries.
The Free Software Foundation is independent of Sun Microsystems, Inc. */
/* Written by Per Bothner <bothner@cygnus.com>, February 1996. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "zipfile.h"
/* This stuff is partly based on the 28 August 1994 public release of the
Info-ZIP group's portable UnZip zipfile-extraction program (and related
utilities). */
/*************/
/* Defines */
/*************/
#define UNZIP
#define UNZIP_VERSION 20 /* compatible with PKUNZIP 2.0 */
#define VMS_UNZIP_VERSION 42 /* if OS-needed-to-extract is VMS: can do */
#define ZSUFX ".zip"
#define CENTRAL_HDR_SIG "\113\001\002" /* the infamous "PK" signature */
#define LOCAL_HDR_SIG "\113\003\004" /* bytes, sans "P" (so unzip */
#define END_CENTRAL_SIG "\113\005\006" /* executable not mistaken for */
#define EXTD_LOCAL_SIG "\113\007\010" /* zipfile itself) */
#define STORED 0 /* compression methods */
#define SHRUNK 1
#define REDUCED1 2
#define REDUCED2 3
#define REDUCED3 4
#define REDUCED4 5
#define IMPLODED 6
#define TOKENIZED 7
#define DEFLATED 8
#define NUM_METHODS 9 /* index of last method + 1 */
/* don't forget to update list_files() appropriately if NUM_METHODS changes */
#define PK_OK 0 /* no error */
#define PK_COOL 0 /* no error */
#define PK_GNARLY 0 /* no error */
#define PK_WARN 1 /* warning error */
#define PK_ERR 2 /* error in zipfile */
#define PK_BADERR 3 /* severe error in zipfile */
#define PK_MEM 4 /* insufficient memory */
#define PK_MEM2 5 /* insufficient memory */
#define PK_MEM3 6 /* insufficient memory */
#define PK_MEM4 7 /* insufficient memory */
#define PK_MEM5 8 /* insufficient memory */
#define PK_NOZIP 9 /* zipfile not found */
#define PK_PARAM 10 /* bad or illegal parameters specified */
#define PK_FIND 11 /* no files found */
#define PK_DISK 50 /* disk full */
#define PK_EOF 51 /* unexpected EOF */
/*---------------------------------------------------------------------------
True sizes of the various headers, as defined by PKWARE--so it is not
likely that these will ever change. But if they do, make sure both these
defines AND the typedefs below get updated accordingly.
---------------------------------------------------------------------------*/
#define LREC_SIZE 26 /* lengths of local file headers, central */
#define CREC_SIZE 42 /* directory headers, and the end-of- */
#define ECREC_SIZE 18 /* central-dir record, respectively */
#ifndef SEEK_SET
# define SEEK_SET 0
# define SEEK_CUR 1
# define SEEK_END 2
#endif
/**************/
/* Typedefs */
/**************/
typedef char boolean;
typedef unsigned char uch; /* code assumes unsigned bytes; these type- */
typedef unsigned short ush; /* defs replace byte/UWORD/ULONG (which are */
typedef unsigned long ulg; /* predefined on some systems) & match zip */
/*---------------------------------------------------------------------------
Zipfile layout declarations. If these headers ever change, make sure the
xxREC_SIZE defines (above) change with them!
---------------------------------------------------------------------------*/
typedef uch local_byte_hdr[ LREC_SIZE ];
# define L_VERSION_NEEDED_TO_EXTRACT_0 0
# define L_VERSION_NEEDED_TO_EXTRACT_1 1
# define L_GENERAL_PURPOSE_BIT_FLAG 2
# define L_COMPRESSION_METHOD 4
# define L_LAST_MOD_FILE_TIME 6
# define L_LAST_MOD_FILE_DATE 8
# define L_CRC32 10
# define L_COMPRESSED_SIZE 14
# define L_UNCOMPRESSED_SIZE 18
# define L_FILENAME_LENGTH 22
# define L_EXTRA_FIELD_LENGTH 24
typedef uch cdir_byte_hdr[ CREC_SIZE ];
# define C_VERSION_MADE_BY_0 0
# define C_VERSION_MADE_BY_1 1
# define C_VERSION_NEEDED_TO_EXTRACT_0 2
# define C_VERSION_NEEDED_TO_EXTRACT_1 3
# define C_GENERAL_PURPOSE_BIT_FLAG 4
# define C_COMPRESSION_METHOD 6
# define C_LAST_MOD_FILE_TIME 8
# define C_LAST_MOD_FILE_DATE 10
# define C_CRC32 12
# define C_COMPRESSED_SIZE 16
# define C_UNCOMPRESSED_SIZE 20
# define C_FILENAME_LENGTH 24
# define C_EXTRA_FIELD_LENGTH 26
# define C_FILE_COMMENT_LENGTH 28
# define C_DISK_NUMBER_START 30
# define C_INTERNAL_FILE_ATTRIBUTES 32
# define C_EXTERNAL_FILE_ATTRIBUTES 34
# define C_RELATIVE_OFFSET_LOCAL_HEADER 38
typedef uch ec_byte_rec[ ECREC_SIZE+4 ];
/* define SIGNATURE 0 space-holder only */
# define NUMBER_THIS_DISK 4
# define NUM_DISK_WITH_START_CENTRAL_DIR 6
# define NUM_ENTRIES_CENTRL_DIR_THS_DISK 8
# define TOTAL_ENTRIES_CENTRAL_DIR 10
# define SIZE_CENTRAL_DIRECTORY 12
# define OFFSET_START_CENTRAL_DIRECTORY 16
# define ZIPFILE_COMMENT_LENGTH 20
typedef struct local_file_header { /* LOCAL */
uch version_needed_to_extract[2];
ush general_purpose_bit_flag;
ush compression_method;
ush last_mod_file_time;
ush last_mod_file_date;
ulg crc32;
ulg csize;
ulg ucsize;
ush filename_length;
ush extra_field_length;
} local_file_hdr;
typedef struct central_directory_file_header { /* CENTRAL */
uch version_made_by[2];
uch version_needed_to_extract[2];
ush general_purpose_bit_flag;
ush compression_method;
ush last_mod_file_time;
ush last_mod_file_date;
ulg crc32;
ulg csize;
ulg ucsize;
ush filename_length;
ush extra_field_length;
ush file_comment_length;
ush disk_number_start;
ush internal_file_attributes;
ulg external_file_attributes;
ulg relative_offset_local_header;
} cdir_file_hdr;
typedef struct end_central_dir_record { /* END CENTRAL */
ush number_this_disk;
ush num_disk_with_start_central_dir;
ush num_entries_centrl_dir_ths_disk;
ush total_entries_central_dir;
ulg size_central_directory;
ulg offset_start_central_directory;
ush zipfile_comment_length;
} ecdir_rec;
/************/
/* Macros */
/************/
#ifndef MAX
# define MAX(a,b) ((a) > (b) ? (a) : (b))
#endif
#ifndef MIN
# define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
/***********************/
/* Prototypes */
/***********************/
static ush makeword (const uch *);
static ulg makelong (const uch *);
static long find_zip_file_start (int fd, long offset);
/***********************/
/* Function makeword() */
/***********************/
static ush makeword(const uch *b)
{
/*
* Convert Intel style 'short' integer to non-Intel non-16-bit
* host format. This routine also takes care of byte-ordering.
*/
return (ush)((b[1] << 8) | b[0]);
}
/***********************/
/* Function makelong() */
/***********************/
static ulg
makelong (const uch *sig)
{
/*
* Convert intel style 'long' variable to non-Intel non-16-bit
* host format. This routine also takes care of byte-ordering.
*/
return (((ulg)sig[3]) << 24)
+ (((ulg)sig[2]) << 16)
+ (((ulg)sig[1]) << 8)
+ ((ulg)sig[0]);
}
/* Examine file's header in zip file and return the offset of the
start of the actual data. Return -1 on error. OFFSET is the
offset from the beginning of the zip file of the file's header. */
static long
find_zip_file_start (int fd, long offset)
{
int filename_length, extra_field_length;
unsigned char buffer[LREC_SIZE + 4];
if (lseek (fd, offset, SEEK_SET) < 0)
return -1;
if (read (fd, buffer, LREC_SIZE + 4) != LREC_SIZE + 4)
return -1;
if (buffer[0] != 'P' || strncmp ((const char *) &buffer[1], LOCAL_HDR_SIG, 3))
return -1;
filename_length = makeword (&buffer[4 + L_FILENAME_LENGTH]);
extra_field_length = makeword (&buffer[4 + L_EXTRA_FIELD_LENGTH]);
return offset + (4 + LREC_SIZE) + filename_length + extra_field_length;
}
int
read_zip_archive (ZipFile *zipf)
{
int i;
int dir_last_pad;
char *dir_ptr;
char buffer[100];
zipf->size = lseek (zipf->fd, 0L, SEEK_END);
if (zipf->size < (ECREC_SIZE+4) || lseek (zipf->fd, (long)(-(ECREC_SIZE+4)), SEEK_CUR) <= 0)
return -1;
if (read (zipf->fd, buffer, ECREC_SIZE+4) != ECREC_SIZE+4)
return -2;
if (buffer[0] != 'P'
|| strncmp ((const char *) &buffer[1], END_CENTRAL_SIG, 3))
{
/* We could not find the end-central-header signature, probably
because a zipfile comment is present. Scan backwards until we
find the signature. */
if (lseek (zipf->fd, (long)(-ECREC_SIZE), SEEK_END) <= 0)
return -2;
while (buffer[0] != 'P'
|| strncmp ((const char *) &buffer[1], END_CENTRAL_SIG, 3))
{
if (lseek (zipf->fd, -5, SEEK_CUR) < 0)
return -2;
if (read (zipf->fd, buffer, 4) != 4)
return -2;
}
if (read (zipf->fd, buffer + 4, ECREC_SIZE) != ECREC_SIZE)
return -2;
}
zipf->count = makeword((const uch *) &buffer[TOTAL_ENTRIES_CENTRAL_DIR]);
zipf->dir_size = makelong((const uch *) &buffer[SIZE_CENTRAL_DIRECTORY]);
/* Allocate 1 more to allow appending '\0' to last filename. */
zipf->central_directory = XNEWVEC (char, zipf->dir_size + 1);
if (lseek (zipf->fd, -(zipf->dir_size+ECREC_SIZE+4), SEEK_CUR) < 0)
return -2;
if (read (zipf->fd, zipf->central_directory, zipf->dir_size) < 0)
return -2;
#ifdef TEST
printf ("number_this_disk = %d\n", makeword(&buffer[NUMBER_THIS_DISK]));
printf ("num_disk_with_start_central_dir = %d\n", makeword(&buffer[NUM_DISK_WITH_START_CENTRAL_DIR]));
printf ("num_entries_centrl_dir_ths_disk = %d\n",
makeword(&buffer[NUM_ENTRIES_CENTRL_DIR_THS_DISK]));
printf ("total_entries_central_dir = %d\n",
makeword(&buffer[TOTAL_ENTRIES_CENTRAL_DIR]));
printf ("size_central_directory = %d\n",
makelong((const uch *) &buffer[SIZE_CENTRAL_DIRECTORY]));
printf ("offset_start_central_directory = %d\n",
makelong((const uch *) &buffer[OFFSET_START_CENTRAL_DIRECTORY]));
printf ("zipfile_comment_length = %d\n",
makeword(&buffer[ZIPFILE_COMMENT_LENGTH]));
#endif
dir_last_pad = 0;
dir_ptr = zipf->central_directory;
for (i = 0; i < zipf->count; i++)
{
ZipDirectory *zipd = (ZipDirectory*)(dir_ptr + dir_last_pad);
int compression_method = (int) dir_ptr[4+C_COMPRESSION_METHOD];
long size = makelong ((const uch *) &dir_ptr[4+C_COMPRESSED_SIZE]);
long uncompressed_size = makelong ((const uch *) &dir_ptr[4+C_UNCOMPRESSED_SIZE]);
long filename_length = makeword ((const uch *) &dir_ptr[4+C_FILENAME_LENGTH]);
long extra_field_length = makeword ((const uch *) &dir_ptr[4+C_EXTRA_FIELD_LENGTH]);
long file_offset = makelong ((const uch *) &dir_ptr[4+C_RELATIVE_OFFSET_LOCAL_HEADER]);
int unpadded_direntry_length;
if ((dir_ptr-zipf->central_directory)+filename_length+CREC_SIZE+4>zipf->dir_size)
return -1;
zipd->filename_length = filename_length;
zipd->compression_method = compression_method;
zipd->size = size;
zipd->uncompressed_size = uncompressed_size;
zipd->zipf = zipf;
#ifdef __GNUC__
#define DIR_ALIGN __alignof__(ZipDirectory)
#else
#define DIR_ALIGN sizeof(long)
#endif
zipd->filestart = find_zip_file_start (zipf->fd, file_offset);
zipd->filename_offset = CREC_SIZE+4 - dir_last_pad;
unpadded_direntry_length
= zipd->filename_offset + zipd->filename_length + extra_field_length;
zipd->direntry_size =
((unpadded_direntry_length + DIR_ALIGN) / DIR_ALIGN) * DIR_ALIGN;
dir_last_pad = zipd->direntry_size - unpadded_direntry_length;
dir_ptr = (char*)zipd + unpadded_direntry_length;
*dir_ptr = '\0';
}
return 0;
}
#ifdef TEST
main (void)
{
ZipFile zipf[1];
ZipDirectory *zipd;
int i;
zipf->fd = 0;
i = read_zip_archive (zipf);
if (i)
{
fprintf (stderr, "Bad zip file.\n");
exit (i);
}
zipd = (ZipDirectory*) zipf->central_directory;
for (i = 0; i < zipf->count; i++, zipd = ZIPDIR_NEXT (zipd))
{
printf ("%d: size:%d, name(#%d)%s, offset:%d\n",
i, zipd->size, zipd->filename_length,
ZIPDIR_FILENAME (zipd),
zipd->filestart);
}
}
#endif

View File

@ -1,67 +0,0 @@
/* Definitions for using a zipped' archive.
Copyright (C) 1996-2016 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 3, 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 COPYING3. If not see
<http://www.gnu.org/licenses/>.
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 ZipFile {
char *name;
int fd;
long size;
long count;
long dir_size;
char *central_directory;
/* Chain together in SeenZipFiles. */
struct ZipFile *next;
};
typedef struct ZipFile ZipFile;
struct ZipDirectory {
int direntry_size;
int filename_offset;
int compression_method;
unsigned size; /* length of file */
unsigned uncompressed_size; /* length of uncompressed data */
unsigned filestart; /* start of file in archive */
ZipFile *zipf;
int filename_length;
/* char mid_padding[...]; */
/* char filename[filename_length]; */
/* char end_padding[...]; */
};
typedef struct ZipDirectory ZipDirectory;
extern struct ZipFile *SeenZipFiles;
#define ZIPDIR_FILENAME(ZIPD) ((char*)(ZIPD)+(ZIPD)->filename_offset)
#define ZIPDIR_NEXT(ZIPD) \
((ZipDirectory*)((char*)(ZIPD)+(ZIPD)->direntry_size))
#define ZIPMAGIC 0x504b0304
#define ZIPEMPTYMAGIC 0x504b0506
extern ZipFile * opendir_in_zip (const char *, int);
extern int read_zip_archive (ZipFile *);
#ifdef GCC_JCF_H
extern int read_zip_member (JCF*, ZipDirectory*, ZipFile *);
extern int open_in_zip (struct JCF *, const char *, const char *, int);
#endif

View File

@ -1,340 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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 of the License, 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

View File

@ -1,64 +0,0 @@
2016-07-13 Matthew Fortune <matthew.fortune@imgtec.com>
* java/lang/reflect/natVMProxy.cc (unbox): Use ffi_arg for
integer return types smaller than a word.
* testsuite/libjava.jar/ReturnInvocationHandler.java: New file.
* testsuite/libjava.jar/ReturnProxyTest.jar: Likewise.
* testsuite/libjava.jar/ReturnProxyTest.java: Likewise.
* testsuite/libjava.jar/ReturnProxyTest.out: Likewise.
* testsuite/libjava.jar/ReturnProxyTest.xfail: Likewise.
* testsuite/libjava.jar/ReturnTypes.java: Likewise.
* testsuite/libjava.jar/ReturnTypesImpl.java: Likewise.
2016-07-13 Matthew Fortune <matthew.fortune@imgtec.com>
* interpret-run.cc: Use ffi_arg for FFI integer return types.
* testsuite/libjava.jar/arraysort.java: New file.
* testsuite/libjava.jar/arraysort.jar: New file.
* testsuite/libjava.jar/arraysort.out: New file.
* testsuite/libjava.jar/arraysort.xfail: New file.
2016-06-01 Matthias Klose <doko@ubuntu.com>
* libtool-version: Bump soversion.
2016-05-31 Roger Sayle <roger@nextmovesoftware.com>
* testsuite/libjava.lang/BuiltinBitCount.java: New test case.
* testsuite/libjava.lang/BuiltinReverseBytes.java: Likewise.
2016-04-30 Oleg Endo <olegendo@gcc.gnu.org>
* classpath/config.guess: Revert r235676.
* classpath/config.sub: Revert r235676.
2016-04-30 Oleg Endo <olegendo@gcc.gnu.org>
* classpath/config.guess: Remove SH5 support.
* classpath/config.sub: Likewise.
2016-04-20 Ben Elliston <bje@gnu.org>
PR testsuite/70719
* testsuite/lib/libjava.exp (libjava_arguments): Use 'file
normalize' rather than the defunct DejaGnu 'absolute' proc.
2016-01-04 Jakub Jelinek <jakub@redhat.com>
* classpath/gnu/java/rmi/registry/RegistryImpl.java (version): Update
copyright notice dates.
* classpath/tools/gnu/classpath/tools/orbd/Main.java (run): Ditto.
* gnu/gcj/convert/Convert.java (version): Update copyright notice
dates.
* gnu/gcj/tools/gcj_dbtool/Main.java (main): Ditto.
2016-01-03 Matthias Klose <doko@ubuntu.com>
* libtool-version: Bump soversion.
* include/jvm.h (GCJ_CXX_ABI_VERSION): Don't encode __GNUC_MINOR__.
Copyright (C) 2016 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.

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

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

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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,514 +0,0 @@
2009-12-30 Robert Millan <rmh.gcc@aybabtu.com>
PR other/42537
* classpath/java/rmi/activation/Activatable.java: Fix typos in comment.
2009-12-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure.ac: Remove code to un-precious-ize CC, CXX,
CXXFLAGS, CFLAGS, LDFLAGS.
* configure: Regenerate.
2009-12-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* include/pa-signal.h: Do not include ucontext.h.
(SIGNAL_HANDLER): Add __attribute__ ((unused)) to signal handler
arguments.
(MAKE_THROW_FRAME): Do not adjust program counter.
* include/hppa-signal.h: Do not include sys/types.h, sys/syscall.h and
unistd.h.
(MAKE_THROW_FRAME): Do not adjust program counter.
(HANDLE_FPE): Define.
(INIT_SEGV, INIT_FPE): Revise indentation.
2009-12-09 Bryce McKinlay <bmckinlay@gmail.com>
PR java/41991
* configure.ac (SYSTEMSPEC): Pass -allow_stack_execute to Darwin
linker.
* Makefile.am (gij_LDFLAGS): Remove extra_gij_ldflags.
* configure: Regenerate.
* Makefile.in: Regenerate.
2009-12-08 Eric Botcazou <ebotcazou@adacore.com>
* configure.host (sparc*-sun-solaris2.*): New case.
* include/dwarf2-signal.h (MAKE_THROW_FRAME, SPARC case): Make dummy.
* include/sparc-signal.h: Do not include ucontext.h.
(SIGNAL_HANDLER): Rename symbol.
(FLUSH_REGISTER_WINDOWS): Delete.
(MAKE_THROW_FRAME): Make dummy.
(INIT_SEGV): Adjust for above renaming.
(INIT_FPE): Likewise.
2009-12-07 Eric Botcazou <ebotcazou@adacore.com>
* configure.ac (net/if.h check): Include sys/socket.h if present.
* configure: Regenerate.
2009-12-05 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.in: Regenerate.
* configure: Regenerate.
* gcj/Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
2009-12-02 Ben Elliston <bje@au.ibm.com>
* java/net/natVMURLConnection.cc (guessContentTypeFromBuffer):
Mark `bytes' and `valid' parameters as potentially unused.
2009-11-30 Dave Korn <dave.korn.cygwin@gmail.com>
* testsuite/lib/libjava.exp (libjava_init): Add host-dependent
settings for LC_ALL and LANG.
2009-11-30 Ben Elliston <bje@au.ibm.com>
* jni.cc (_Jv_JNI_GetObjectRefType): Mark `object' parameter as
maybe unused.
2009-11-26 Ben Elliston <bje@au.ibm.com>
* posix-threads.cc (ParkHelper::unpark): Do not initialise result,
but assign it instead. Eliminates an unused variable warning when
the result == 0 assertion is disabled.
2009-11-17 Andrew Haley <aph@redhat.com>
* posix-threads.cc (park): Rewrite code to handle time.
Move mutex lock before the call to compare_and_swap to avoid a
race condition.
Add some assertions.
(unpark): Add an assertion.
(init): Move here from posix-threads.h.
* include/posix-threads.h (destroy): removed.
2009-11-13 Eric Botcazou <ebotcazou@adacore.com>
* exception.cc (PERSONALITY_FUNCTION): Fix oversight.
2009-11-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
PR bootstrap/38867
* configure.ac (expanded_prefix): New variable, set to the
default prefix if none was passed on the command line.
* configure: Regenerate.
2009-10-22 Matthias Klose <doko@ubuntu.com>
* configure.ac: Rename --enable-plugin to --enable-browser-plugin,
pass --{en,dis}able-plugin to the classpath configure.
* configure: Regenerate.
2009-09-30 Dave Korn <dave.korn.cygwin@gmail.com>
* configure.host (libgcj_sublib_ltflags): New variable.
* configure.ac (LIBGCJ_SUBLIB_LTFLAGS): AC_SUBST variable for
the above in makefiles.
* configure: Regenerate.
* Makefile.am (libgcj_la_LDFLAGS_NOUNDEF): Rename from this ...
(LIBJAVA_LDFLAGS_NOUNDEF): ... to this, initialise from
LIBGCJ_SUBLIB_LTFLAGS (only when building sublibs), and ...
(libgij_la_LDFLAGS, libgcj_tools_la_LDFLAGS, libjvm_la_LDFLAGS,
lib_gnu_awt_xlib_la_LDFLAGS, libgcj_bc_la_LDFLAGS): ... use it in
all these places to replace hard-coded -no-undefined and -bindir
flags, as well as ...
(libgcj_la_LDFLAGS): ... updating existing reference here.
* Makefile.in: Regenerate.
* include/Makefile.in: Likewise.
* testsuite/Makefile.in: Likewise.
* gcj/Makefile.in: Likewise.
2009-09-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
PR libgcj/38298
* Makefile.am (libgcj_tools_la_LIBADD): Add '-lm'.
* Makefile.in: Regenerate.
2009-09-22 Dave Korn <dave.korn.cygwin@gmail.com>
* configure.host (enable_libgcj_sublibs_default): New variable,
set for Cygwin and MinGW.
* configure.ac (--enable-libgcj-sublibs): New command-line switch.
(BUILD_SUBLIBS): New AM_CONDITIONAL relating to it.
(libgcj_spec_lgcj_override): New variable, define if building sublibs.
(libgcj_spec_lgcj_bc_override): Likewise for when USE_LIBGCJ_BC.
(LIBGCJ_SPEC_LGCJ): New variable to abstract "-lgcj" from specs.
(LIBGCJ_SPEC_LGCJ_BC): Likewise for when USE_LIBGCJ_BC.
(LIBGCJ_SPEC): Use them.
* configure: Regenerate.
* Makefile.am (LOWER_PACKAGE_FILES_LO): New variable.
(ALL_PACKAGE_SOURCE_FILES_LO): Likewise.
(NONCORE_PACKAGE_SOURCE_FILES_LO): Likewise.
(CORE_PACKAGE_SOURCE_FILES_LO): Likewise.
(toolexeclib_LTLIBRARIES): Add libgcj-noncore.la if building sublibs.
(libgcj_noncore_la_LIBADD_SUBOBJECTS): New variable.
(libgcj_la_LIBADD_SUBOBJECTS): Likewise.
(libgcj_la_LDFLAGS_NOUNDEF): Likewise.
(libgij_la_LDFLAGS): Add DLL-related options.
(libgcj_la_LDFLAGS): Use libgcj_la_LDFLAGS_NOUNDEF and
libgcj_la_LIBADD_SUBOBJECTS.
(libgcj_la_DEPENDENCIES): Adjust to match.
(libgcj_noncore_la_SOURCES, libgcj_noncore_la_LDFLAGS,
libgcj_noncore_la_LIBADD, libgcj_noncore_la_DEPENDENCIES,
libgcj_noncore_la_LINK): New automake variables for sublibrary.
(libgcj_tools_la_LDFLAGS): Add DLL-related flags.
(libgcj_tools_la_LIBADD): New variable.
(libjvm_la_LDFLAGS): Add DLL-related flags.
(lib_gnu_awt_xlib_la_LDFLAGS): Likewise.
(libgcj_bc_la_LDFLAGS): Likewise.
(libgij_la_DEPENDENCIES): Add dependency on libgcj-noncore.la when
building sublibs.
(libgcj_tools_la_DEPENDENCIES, libjvm_la_DEPENDENCIES,
lib_gnu_awt_xlib_la_DEPENDENCIES, jv_convert_DEPENDENCIES,
gcj_dbtool_DEPENDENCIES, gc_analyze_DEPENDENCIES, ecjx_DEPENDENCIES):
Likewise.
* Makefile.in: Regenerate.
* sysdep/i386/backtrace.h (MAIN_FUNC): New #define for main function,
set appropriately for Cygwin on that platform or to "main" elsewhere.
(fallback_backtrace): Use it to limit stack unwind.
2009-09-16 Jonathan Yong <jon_y@users.sourceforge.net>
* gnu/java/security/jce/prng/natVMSecureRandomWin32.cc: Correct
UnsupportedOperationException namespace.
2009-09-16 Andrew Haley <aph@redhat.com>
* libgcj_bc.c (__data_start, data_start, _end): Add dummy usage.
2009-09-11 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.am (libgij_la_LINK, libjvm_la_LINK): New.
* Makefile.in: Regenerate.
2009-09-08 Alexandre Oliva <aoliva@redhat.com>
* configure: Rebuilt with modified libtool.m4.
2009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure.ac (AC_PREREQ): Bump to 2.64.
2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* HACKING: Use aclocal-1.11 and autoconf-2.64 in example.
* Makefile.am (install-html, install-pdf): Remove.
* Makefile.in: Regenerate.
* Makefile.in: Regenerate.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* gcj/Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
* include/config.h.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
* Makefile.am (libgcj_la_LINK, libgcj_tools_la_LINK)
(lib_gnu_awt_xlib_la_LINK, libgcj_bc_la_LINK, jv_convert_LINK)
(gcj_dbtool_LINK, gc_analyze_LINK, gij_LINK, ecjx_LINK)
(gappletviewer_LINK, gjarsigner_LINK, gkeytool_LINK)
(gjar_LINK, gjavah_LINK, gcjh_LINK, gnative2ascii_LINK)
(gorbd_LINK, grmid_LINK, gserialver_LINK, gtnameserv_LINK)
(grmic_LINK, grmiregistry_LINK, gjdoc_LINK): Add $(gjdoc_LDFLAGS).
(GCJLINK, LIBLINK, CXXLINK): Add $(LIBTOOLFLAGS).
* Makefile.in: Regenerate.
2009-08-17 Andrew Haley <aph@redhat.com>
* Makefile.am (libgcj_bc_la_LIBADD): Delete.
* libgcj.spec.in: (LIBGCJ_BC_SPEC): New spec.
* configure.ac (LIBGCJ_BC_SPEC): New spec.
2009-08-17 Andrew Haley <aph@redhat.com>
* Makefile.in,
include/Makefile.in,
testsuite/Makefile.in,
gcj/Makefile.in: Regenerate.
2009-08-14 Kai Tietz <kai.tietz@onevision.com>
* gnu/java/security/jce/prng/natVMSecureRandomWin32.cc: Add include of
java/lang/UnsupportedOperationException.h file.
2009-08-12 Andrew Haley <aph@redhat.com>
* sysdep/arm/locks.h: Use atomic builtins For Linux EABI.
* configure.ac: Add ATOMICSPEC.
* libgcj.spec.in: Likewise.
* configure.host (arm*-linux*): Add -Wno-abi to cxxflags.
(testsuite/libjava.jvmti/jvmti-interp.exp): Likewise.
(testsuite/libjava.jvmti/jvmti.exp): Likewise.
(testsuite/libjava.jni/jni.exp): Likewise.
Set ATOMICSPEC.
Set LDFLAGS to work around libtool feature.
2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure.ac (_AC_ARG_VAR_PRECIOUS): Use m4_rename_force.
2009-07-28 David Daney <ddaney@caviumnetworks.com>
* gnu/gcj/util/natGCInfo.cc (nomem_handler): Use oomDumpName as
dump file name base.
2009-07-27 Andrew John Hughes <ahughes@redhat.com>
PR libgcj/40616
* java/io/PrintStream.class: Regenerated.
* java/io/PrintStream.h: Updated.
* java/io/PrintStream.java:
(PrintStream(File)): Ported from GNU Classpath
version.
(PrintStream(File, String)): Likewise.
(PrintStream(String)): Likewise.
(PrintStream(String, String)): Likewise.
2009-07-24 Kai Tietz <kai.tietz@onevision.com>
* gnu/java/security/jce/prng/natVMSecureRandomWin32.cc: New Win32
specific implementation.
2009-07-23 Matthias Klose <doko@ubuntu.com>
* contrib/aotcompile.py.in: Use hashlib instead of md5 if available.
2009-07-17 Joseph Myers <joseph@codesourcery.com>
PR other/40784
* configure: Regenerate.
2009-07-16 Joseph Myers <joseph@codesourcery.com>
* configure: Regenerate.
2009-07-11 Richard Sandiford <rdsandiford@googlemail.com>
PR testsuite/40699
PR testsuite/40707
PR testsuite/40709
* testsuite/lib/libjava.exp: Revert 2009-06-30 commit.
2009-06-30 Richard Sandiford <r.sandiford@uk.ibm.com>
* testsuite/lib/libjava.exp (libjava_init): Just add
find_libgcc_s to libjava_libgcc_s_path, rather than every
libgcc multilib directory.
(libjava_arguments): Explain why we add "." to ld_library_path.
(gcj_invoke, exec_gij, libjava_invoke): Use add_path.
2009-06-22 Matthias Klose <doko@ubuntu.com>
* libtool-version: Bump soversion.
2009-05-12 Alexandre Oliva <aoliva@redhat.com>
* configure.ac: Insert libgcjdir in the GCJ passed in the
environment, rather than overriding completely.
* configure: Rebuilt.
2009-04-28 Dave Korn <dave.korn.cygwin@gmail.com>
* testsuite/libjava.jvmti/jvmti-interp.exp
(gcj_jni_compile_c_to_so): Fix so extension to '.dll' on win32.
* testsuite/lib/libjava.exp (libjava_init): Likewise.
* testsuite/libjava.jni/jni.exp
(gcj_jni_compile_c_to_so): Likewise.
(gcj_jni_test_one): Likewise.
2009-04-28 Andrew Haley <aph@redhat.com>
PR libgcj/39899
* Makefile.am (libgcj_tools_la_LDFLAGS): Add
-fno-bootstrap-classes to libgcj_tools_la_GCJFLAGS.
* Makefile.in: Regenerate.
2009-04-28 Dave Korn <dave.korn.cygwin@gmail.com>
* interpret.cc (DEBUG): Rename this ...
(__GCJ_DEBUG): ... to this throughout.
* configure.ac: Likewise.
* interpret-run.cc: Likewise.
* prims.cc: Likewise.
* gnu/classpath/natConfiguration.cc: Likewise.
* include/java-assert.h: Likewise.
* java/io/natVMObjectInputStream.cc: Likewise.
* configure: Regenerate.
* include/config.h.in: Regenerate.
2009-04-28 Dave Korn <dave.korn.cygwin@gmail.com>
* java/lang/natVMClassLoader.cc
(java::lang::VMClassLoader::defineClass): Fix assert.
2009-04-26 Matthias Klose <doko@ubuntu.com>
* contrib/aot-compile.in: Print diagnostics for malformed or invalid
class files.
* contrib/generate-cacerts.pl.in: New.
* configure.ac (AC_CONFIG_FILES): Add generate-cacerts.pl.
2009-04-24 Matthias Klose <doko@ubuntu.com>
* configure.ac: Create missing directory gnu/java/security/jce/prng.
* configure: Regenerate.
2009-04-23 Matthias Klose <doko@ubuntu.com>
* Makefile.am (install-data-local): Fix symlinks to header files.
* Makefile.in: Regenerate.
2009-04-23 Dave Korn <dave.korn.cygwin@gmail.com>
* gnu/classpath/jdwp/natVMVirtualMachine.cc (handle_single_step): Use
casted pointer in debugging assert.
(jdwpBreakpointCB): Likewise.
2009-04-09 Jack Howarth <howarth@bromo.med.uc.edu>
* configure.host: Restore match for darwin9 or later.
* configure.ac: Likewise.
* configure: Regenerate.
2009-03-11 Andrew Haley <aph@redhat.com>
* java/lang/natClassLoader.cc (_Jv_RegisterClassHookDefault): Clear
INTERPRETED access modifier.
2009-03-11 Tom Tromey <tromey@redhat.com>
* link.cc (_Jv_Linker::find_field): Pass the field_type to
_Jv_CheckOrCreateLoadingConstraint, not the class that is
requesting the field.
2009-03-03 Andrew John Hughes <ahughes@redhat.com>
* Makefile.am:
Remove dangling src.zip and javac symlinks.
Fix java.security symlink to use toolexeclibdir
as classpath/resource/Makefile.am does.
* Makefile.in,
* configure: Regenerated.
* configure.ac: Drop hard-coded prefix,
thus removing sdk_dir and making jre_dir="jre".
Map x86_64 to amd64 as used by OpenJDK.
* gcj/Makefile.in,
* include/Makefile.in,
* testsuite/Makefile.in: Regenerated.
2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
2009-02-13 Andrew John Hughes <ahughes@redhat.com>
Import GNU Classpath (classpath-0_98-release).
* Makefile.am: Add natVMSecureRandom.cc.
* Makefile.in: Regenerated.
* classpath/ChangeLog,
* classpath/Makefile.am: Merged.
* classpath/Makefile.in: Regenerated.
* classpath/NEWS: Merged.
* classpath/config.guess,
* classpath/config.sub,
* classpath/configure: Regenerated.
* classpath/configure.ac: Merged.
* classpath/gnu/java/awt/peer/gtk/CairoGraphics2D.java,
* classpath/gnu/java/security/jce/prng/SecureRandomAdapter.java,
* classpath/gnu/javax/crypto/jce/prng/ARCFourRandomSpi.java,
* classpath/gnu/javax/crypto/jce/prng/CSPRNGSpi.java,
* classpath/gnu/javax/crypto/jce/prng/FortunaImpl.java,
* classpath/gnu/javax/crypto/jce/prng/ICMRandomSpi.java,
* classpath/gnu/javax/crypto/jce/prng/UMacRandomSpi.java,
* classpath/gnu/javax/crypto/prng/ICMGenerator.java,
* classpath/gnu/xml/stream/XMLParser.java,
* classpath/java/security/SecureRandom.java,
* classpath/native/jni/native-lib/cpproc.c,
* classpath/native/plugin/gcjwebplugin.cc,
* classpath/tools/gnu/classpath/tools/gjdoc/Main.java: Merged.
* configure: Regenerated.
* configure.ac: Add symlink for natVMSecureRandomPosix.cc to natVMSecureRandom.cc
* gnu/classpath/Configuration.java: Change version to 0.98.
* gnu/java/security/jce/prng/SecureRandomAdapter.h: Regenerated.
* gnu/java/security/jce/prng/VMSecureRandom.h: Generated.
* gnu/java/security/jce/prng/VMSecureRandom.java: Added native implementation.
* gnu/java/security/jce/prng/natVMSecureRandomPosix.cc: Wrapper around /dev/random.
* gnu/javax/crypto/jce/prng/CSPRNGSpi.h,
* gnu/javax/crypto/jce/prng/FortunaImpl.h,
* java/security/SecureRandom.h: Regenerated.
* java/security/VMSecureRandom$Spinner.h,
* java/security/VMSecureRandom.h,
* java/security/VMSecureRandom.java: Removed.
* sources.am: Move VMSecureRandom to gnu.java.security.jce.prng.
2009-02-10 Mark Mitchell <mark@codesourcery.com>
* Makefile.am (AM_MAKEFLAGS): Pass down datadir.
* Makefile.in: Regenerated.
2009-02-09 Mark Mitchell <mark@codesourcery.com>
* addr2name.awk: Remove.
* Makefile.am (bin_SCRIPTS): Remove addr2name.awk.
* Makefile.in: Regenerated.
* configure.ac: Define enable_sjlj_exceptions
appropriately under the ARM EH ABI.
* configure: Regenerated.
* Makefile.am (LTLDFLAGS): Define.
(GCJLINK): Use it.
(LIBLINK): Likewise.
* Makefile.in: Regenerated.
2009-02-03 Jakub Jelinek <jakub@redhat.com>
* gnu/gcj/convert/Convert.java (version): Update copyright notice
dates.
* gnu/gcj/tools/gcj_dbtool/Main.java (main): Likewise.
2009-01-26 Jakub Jelinek <jakub@redhat.com>
PR libgcj/38872
* gcj/javaprims.h (_Jv_CreateJavaVM): Change to extern "C" symbol.
* libjgc_bc.c (_Jv_GetStringChars): Remove.
2009-01-12 Andrew Haley <aph@redhat.com>
* sun/misc/natUnsafe.cc (spinlock contructor): Call sched_yield().
2009-01-11 Matthias Klose <doko@ubuntu.com>
* Makefile.am (ecjx_LDADD): Add $(extra_ldflags).
* Makefile.in: Regenerate.
2009-01-06 Andrew John Hughes <gnu_andrew@member.fsf.org>
Import GNU Classpath (libgcj-snapshot-20090102).
* libjava/classpath/lib/java/text/RuleBasedCollator$CollationSorter.class,
* libjava/classpath/lib/java/text/MessageFormat$MessageFormatElement.class,
* libjava/classpath/lib/java/text/MessageFormat.class,
* libjava/classpath/lib/java/text/SimpleDateFormat.class,
* libjava/classpath/lib/java/text/NumberFormat.class,
* libjava/classpath/lib/java/text/RuleBasedCollator$CollationElement.class,
* libjava/classpath/lib/java/text/MessageFormat$Field.class,
* libjava/classpath/lib/java/text/RuleBasedCollator.class,
* libjava/classpath/lib/java/text/NumberFormat$Field.class,
* libjava/classpath/lib/gnu/xml/transform/Bindings.class,
* libjava/classpath/lib/gnu/java/locale/LocaleData.class,
* libjava/classpath/lib/gnu/java/awt/peer/gtk/FreetypeGlyphVector.class,
* libjava/classpath/lib/gnu/javax/crypto/jce/key/SecretKeyGeneratorImpl.class,
* libjava/gnu/java/awt/peer/gtk/FreetypeGlyphVector.h,
* libjava/java/text/MessageFormat.h,
* libjava/java/text/RuleBasedCollator$CollationSorter.h,
* libjava/java/text/RuleBasedCollator.h,
* libjava/java/text/SimpleDateFormat.h:
Regenerated.

View File

@ -1,723 +0,0 @@
2010-12-13 Andrew John Hughes <ahughes@redhat.com>
PR libgcj/46774
* libjava/java/security/VMAccessController.java:
(DEFAULT_CONTEXT): Create ProtectionDomain with
four argument constructor (arguments are the same
as those implied by the two argument constructor).
(getContext()): Create ProtectionDomain instances
with four argument constructor using a null Principal
array (as before) but including the classloader, which
was always null before.
2010-12-06 Dave Korn <dave.korn.cygwin@gmail.com>
PR target/40125
PR lto/46695
* configure.ac: Invoke ACX_LT_HOST_FLAGS.
* configure.host (libgcj_sublib_ltflags): Use lt_host_flags.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* Makefile.in: Regenerate.
* gcj/Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
2010-11-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* testsuite/libjava.jvmti/jvmti.exp (gcj_jvmti_compile_cxx_to_o):
Add -pthread on alpha*-dec-osf*.
* testsuite/libjava.jvmti/jvmti-interp.exp
(gcj_jni_compile_c_to_so): Likewise.
2010-10-12 Andrew John Hughes <ahughes@redhat.com>
Import GNU Classpath (libgcj-snapshot-20100921).
* libjava/Makefile.in: Regenerated.
* libjava/javax/swing/text/html/StyleSheet.h,
* libjava/javax/swing/text/html/MinimalHTMLWriter.h,
* libjava/javax/swing/text/html/HTMLWriter.h,
* libjava/javax/xml/stream/XMLEventFactory.h,
* libjava/javax/xml/stream/XMLOutputFactory.h,
* libjava/javax/xml/stream/events/Namespace.h,
* libjava/javax/xml/stream/util/StreamReaderDelegate.h,
* libjava/javax/security/auth/kerberos/KeyImpl.h,
* libjava/javax/security/auth/kerberos/KerberosTicket.h:
Regenerated.
* libjava/classpath/Makefile.in,
* libjava/classpath/depcomp,
* libjava/classpath/scripts/Makefile.in,
* libjava/classpath/resource/Makefile.in,
* libjava/classpath/tools/Makefile.in:
Regenerated. Use libtool from top-level config directory.
* libjava/classpath/tools/classes/gnu/classpath/tools/StringToolkit.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/java2xhtml/Java2xhtml.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/java2xhtml/Java2xhtml$State.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/IOToolkit.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$3.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$5.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$7.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$9.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$OptionProcessor.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportClassFile.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ClassComponent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$21.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TagImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ClassDocProxy.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$23.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/BlockSourceComponent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/DirectoryTree$FileNode.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$25.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/IgnoredFileParseException.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TextTagImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Parser$Context.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/InheritDocTagImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/FunctionComponent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/AdditionExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/TypeCastExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/SubtractionExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/Type.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryEqualityExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/InclusiveOrExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/NegateExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/GreaterThanExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantDouble.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/EqualExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantChar.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ExclusiveOrExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantBoolean.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryBitwiseExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LogicalOrExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/Evaluator.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryRelationExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryShiftExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/DivisionExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantInteger.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ShiftLeftExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantShort.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantLong.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LogicalNotExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/GreaterThanOrEqualExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantByte.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LogicalAndExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/MultiplicationExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/UnaryExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantFloat.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ModuloExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantString.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/NotExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/UnknownIdentifierException.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/AndExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConditionalExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/Context.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantNull.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryComputationExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BitShiftRightExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LessThanOrEqualExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ShiftRightExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryLogicalExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LessThanExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/IdentifierExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/CircularExpressionException.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/IllegalExpressionException.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/NotEqualExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportNotFound.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ClassDocImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ParamTagImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Timer.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SourceComponent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/CommentComponent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportReflectionPackage.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/StaticBlockComponent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ValueTagImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SeeTagImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$11.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$13.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ConstructorDocImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$15.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TemporaryStore.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportReflectionClass.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$17.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/BracketClose.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$19.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ParameterImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TypeImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ArrayCharacterIterator.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ScheduledClass.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/FieldComponent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportPackageFile.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$2.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TimerDoclet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SlashSlashCommentComponent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ErrorReporter.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$4.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$6.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/PackageComponent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/MemberDocImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$8.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ExecutableMemberDocImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Parser$1.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/DirectoryTree.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Debug.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/DocImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/MethodDocImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ProgramElementDocImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$20.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ClassDocReflectedImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/FieldDocImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$22.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$24.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TimerDoclet$1.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/PackageDocImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ThrowsTagImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/EmptyStatementComponent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/LinkTagImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/AbstractTagImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ParseException.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$10.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$12.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Parser.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Whitespace.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$14.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ImportComponent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$16.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$18.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SerialFieldTagImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SourcePositionImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/JavadocWrapper.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$1.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TypeVariableImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/NotifyingInputStreamReader.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/javah/MethodHelper.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/javah/GcjhMain.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/javah/JniStubPrinter.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/javah/JniIncludePrinter.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/javah/PathOptionGroup.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/javah/Keywords.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/javah/JniPrintStream.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/javah/CniStubPrinter.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/javah/Main.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/javah/CniPrintStream.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/javah/ClassWrapper.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$3.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/HashFinder.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$4.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$5.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/ClassRmicCompiler$MethodRef.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/WrapUnWrapper.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$6.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$7.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$8.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$9.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Generator.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/GiopIo.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/MethodGenerator.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/RmiMethodGenerator.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/SourceRmicCompiler.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Variables.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/ClassRmicCompiler.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/CompilationError.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$10.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$11.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$12.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$13.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$14.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$15.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$16.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$17.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$18.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/RMICException.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$1.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$2.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/serialver/SerialVer.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/serialver/SerialVer$1.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/serialver/SerialVer$2.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/serialver/SerialVer$3.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/MalformedInputEvent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/debugdoclet/DebugDoclet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletConfigurationException.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$InterfaceRelation.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$DocletOptionTag.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/TargetContext.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/OutputFileInfo.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletOptions.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletException.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTranslet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTranslet$DocErrorReporterOutputStream.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletConfigurationException.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/JarClassLoader.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/HtmlRepairer.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver1_4.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver$1.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver$UsageType.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver$NullErrorReporter.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/HtmlRepairer$TagInfo.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionColonSeparated.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$DocletOptionTaglet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionPackageWildcard.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$UsageType.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionString.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/CssClass.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlPage.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/ExternalDocSet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet$1.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet$2.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet$3.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet$TreeNode.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlTagletContext.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/InvalidPackageWildcardException.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionFlag.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/PackageMatcher.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/StandardTaglet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionFile.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOption.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$IndexKey.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$DocletOptionGroup.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$DocletOptionTagletPath.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/PackageGroup.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/FileSystemClassLoader$JarStreamInfo.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/FileSystemClassLoader$FileStreamInfo.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/taglets/CodeTaglet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/taglets/GenericTaglet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/taglets/ValueTaglet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/taglets/AuthorTaglet$EmailReplacement.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/taglets/DeprecatedTaglet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/taglets/SinceTaglet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/taglets/AuthorTaglet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/taglets/TagletContext.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/taglets/VersionTaglet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/taglets/CopyrightTaglet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/FileSystemClassLoader.class,
* libjava/classpath/tools/classes/com/sun/tools/javadoc/Main.class: Regenerated.
* libjava/classpath/doc/Makefile.in,
* libjava/classpath/doc/api/Makefile.in,
* libjava/classpath/doc/texinfo.tex,
* libjava/classpath/external/Makefile.in,
* libjava/classpath/external/jsr166/Makefile.in,
* libjava/classpath/external/sax/Makefile.in,
* libjava/classpath/external/w3c_dom/Makefile.in,
* libjava/classpath/external/relaxngDatatype/Makefile.in,
* libjava/classpath/include/Makefile.in: Regenerated.
* libjava/classpath/m4/lib-prefix.m4,
* libjava/classpath/m4/lib-link.m4,
* libjava/classpath/m4/lib-ld.m4: Removed.
* libjava/classpath/native/jni/classpath/Makefile.in,
* libjava/classpath/native/jni/gstreamer-peer/Makefile.in,
* libjava/classpath/native/jni/midi-dssi/Makefile.in,
* libjava/classpath/native/jni/Makefile.in,
* libjava/classpath/native/jni/gconf-peer/Makefile.in,
* libjava/classpath/native/jni/java-io/Makefile.in,
* libjava/classpath/native/jni/native-lib/Makefile.in,
* libjava/classpath/native/jni/native-lib/cpnet.c,
* libjava/classpath/native/jni/java-util/Makefile.in,
* libjava/classpath/native/jni/java-lang/Makefile.in,
* libjava/classpath/native/jni/midi-alsa/Makefile.in,
* libjava/classpath/native/jni/java-nio/Makefile.in,
* libjava/classpath/native/jni/java-net/Makefile.in,
* libjava/classpath/native/jni/java-math/Makefile.in,
* libjava/classpath/native/jni/xmlj/Makefile.in,
* libjava/classpath/native/jni/qt-peer/Makefile.in,
* libjava/classpath/native/jni/gtk-peer/Makefile.in,
* libjava/classpath/native/Makefile.in,
* libjava/classpath/native/jawt/Makefile.in,
* libjava/classpath/native/fdlibm/Makefile.in,
* libjava/classpath/native/plugin/Makefile.in,
* libjava/classpath/lib/java/util/regex/Matcher.class,
* libjava/classpath/lib/java/util/TreeMap$3.class,
* libjava/classpath/lib/java/util/Scanner.class,
* libjava/classpath/lib/Makefile.in,
* libjava/classpath/lib/org/omg/PortableServer/_ServantActivatorStub.class,
* libjava/classpath/lib/org/omg/PortableServer/_ServantLocatorStub.class,
* libjava/classpath/lib/org/omg/CORBA/portable/InputStream.class,
* libjava/classpath/lib/org/omg/CORBA/portable/ObjectImpl.class,
* libjava/classpath/lib/org/omg/CORBA/portable/Delegate.class,
* libjava/classpath/lib/org/omg/CORBA/LocalObject.class,
* libjava/classpath/lib/org/omg/CORBA_2_3/portable/InputStream.class,
* libjava/classpath/lib/org/omg/CORBA_2_3/portable/OutputStream.class,
* libjava/classpath/lib/org/omg/DynamicAny/_DynSequenceStub.class,
* libjava/classpath/lib/org/omg/DynamicAny/_DynValueStub.class,
* libjava/classpath/lib/org/omg/DynamicAny/_DynStructStub.class,
* libjava/classpath/lib/org/omg/DynamicAny/_DynEnumStub.class,
* libjava/classpath/lib/org/omg/DynamicAny/_DynArrayStub.class,
* libjava/classpath/lib/org/omg/DynamicAny/_DynAnyFactoryStub.class,
* libjava/classpath/lib/org/omg/DynamicAny/_DynAnyStub.class,
* libjava/classpath/lib/org/omg/DynamicAny/_DynUnionStub.class,
* libjava/classpath/lib/org/omg/DynamicAny/_DynFixedStub.class,
* libjava/classpath/lib/org/ietf/jgss/GSSManager.class,
* libjava/classpath/lib/gnu/xml/stream/NamespaceImpl.class,
* libjava/classpath/lib/gnu/xml/stream/XIncludeFilter.class,
* libjava/classpath/lib/gnu/xml/stream/FilteredStreamReader.class,
* libjava/classpath/lib/gnu/xml/stream/XMLEventFactoryImpl.class,
* libjava/classpath/lib/gnu/xml/stream/XMLEventAllocatorImpl.class,
* libjava/classpath/lib/gnu/xml/stream/XMLStreamWriterImpl.class,
* libjava/classpath/lib/gnu/java/locale/LocaleData.class,
* libjava/classpath/lib/gnu/javax/swing/text/html/css/Selector.class,
* libjava/classpath/lib/gnu/javax/print/ipp/IppRequest$RequestWriter.class,
* libjava/classpath/lib/gnu/javax/print/ipp/IppResponse$ResponseReader.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/PrinterDriverInstaller.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/CharsetConfigured.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/NaturalLanguageConfigured.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/MultipleOperationTimeOut.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/PrinterCurrentTime.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/DocumentFormat.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/PrinterUpTime.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/PrinterStateMessage.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/PrintQualitySupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/PrinterResolutionSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/SidesSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/MultipleDocumentJobsSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/PageRangesSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/OrientationRequestedSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/MediaSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/IppVersionsSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/OperationsSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/JobSheetsSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/DocumentFormatSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/UriSecuritySupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/GeneratedNaturalLanguageSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/CharsetSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/JobHoldUntilSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/MultipleDocumentHandlingSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/UriAuthenticationSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/FinishingsSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/CompressionSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/PrinterUriSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/JobSheetsDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/DocumentFormatDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/PrinterResolutionDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/SidesDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/JobPriorityDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/JobHoldUntilDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/NumberUpDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/OrientationRequestedDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/MediaDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/MultipleDocumentHandlingDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/FinishingsDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/CopiesDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/PrintQualityDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/UnknownAttribute.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/DetailedStatusMessage.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobPrinterUri.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/AttributesCharset.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobStateMessage.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/AttributesNaturalLanguage.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobDetailedStatusMessages.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobId.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobDocumentAccessErrors.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobMoreInfo.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobUri.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/RequestedAttributes.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/StatusMessage.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/DocumentAccessError.class,
* libjava/classpath/lib/gnu/javax/print/ipp/IppUtilities.class,
* libjava/classpath/lib/gnu/javax/print/ipp/IppPrintService.class,
* libjava/classpath/lib/gnu/javax/print/ipp/IppResponse.class,
* libjava/classpath/lib/javax/swing/tree/DefaultMutableTreeNode.class,
* libjava/classpath/lib/javax/swing/tree/VariableHeightLayoutCache.class,
* libjava/classpath/lib/javax/swing/tree/DefaultMutableTreeNode$PostorderEnumeration.class,
* libjava/classpath/lib/javax/swing/tree/DefaultMutableTreeNode$BreadthFirstEnumeration.class,
* libjava/classpath/lib/javax/swing/tree/DefaultMutableTreeNode$PreorderEnumeration.class,
* libjava/classpath/lib/javax/swing/tree/FixedHeightLayoutCache.class,
* libjava/classpath/lib/javax/swing/text/html/HTMLEditorKit.class,
* libjava/classpath/lib/javax/swing/text/html/StyleSheet$BoxPainter.class,
* libjava/classpath/lib/javax/swing/text/html/HTMLWriter.class,
* libjava/classpath/lib/javax/swing/text/html/TableView$RowView.class,
* libjava/classpath/lib/javax/swing/text/html/MultiAttributeSet$MultiNameEnumeration.class,
* libjava/classpath/lib/javax/swing/text/html/MultiStyle.class,
* libjava/classpath/lib/javax/swing/text/html/ImageView.class,
* libjava/classpath/lib/javax/swing/text/html/TableView$CellView.class,
* libjava/classpath/lib/javax/swing/text/html/MultiAttributeSet.class,
* libjava/classpath/lib/javax/swing/text/html/ImageView$1.class,
* libjava/classpath/lib/javax/swing/text/html/StyleSheet$ListPainter.class,
* libjava/classpath/lib/javax/swing/text/html/TableView.class,
* libjava/classpath/lib/javax/swing/text/html/StyleSheet.class,
* libjava/classpath/lib/javax/swing/text/html/ObjectView.class,
* libjava/classpath/lib/javax/swing/text/html/MinimalHTMLWriter.class,
* libjava/classpath/lib/javax/swing/undo/UndoableEditSupport.class,
* libjava/classpath/lib/javax/swing/undo/StateEdit.class,
* libjava/classpath/lib/javax/xml/stream/XMLEventFactory.class,
* libjava/classpath/lib/javax/xml/stream/events/Namespace.class,
* libjava/classpath/lib/javax/xml/stream/XMLInputFactory.class,
* libjava/classpath/lib/javax/xml/stream/util/StreamReaderDelegate.class,
* libjava/classpath/lib/javax/xml/stream/XMLOutputFactory.class,
* libjava/classpath/lib/javax/security/auth/kerberos/KerberosTicket.class,
* libjava/classpath/lib/javax/security/auth/kerberos/KeyImpl.class,
* libjava/classpath/missing,
* libjava/classpath/aclocal.m4,
* libjava/classpath/examples/Makefile.in,
* libjava/classpath/install-sh,
* libjava/gnu/xml/stream/FilteredStreamReader.h,
* libjava/gnu/xml/stream/XMLStreamWriterImpl.h,
* libjava/gnu/xml/stream/NamespaceImpl.h,
* libjava/gnu/xml/stream/XIncludeFilter.h,
* libjava/gnu/javax/swing/text/html/css/Selector.h,
* libjava/gnu/javax/print/ipp/attribute/RequestedAttributes.h,
* libjava/sources.am: Regenerated.
2010-09-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libjava/Makefile.in: Regenerate.
* libjava/gcj/Makefile.in: Regenerate.
* libjava/include/Makefile.in: Regenerate.
* libjava/testsuite/Makefile.in: Regenerate.
2010-09-21 Jack Howarth <howarth@bromo.med.uc.edu>
* libjava/configure.ac: Set LIBMATHSPEC to -lm except on darwin.
* libjava/libgcj.spec.in: Use LIBMATHSPEC.
* libjava/configure: Regenerate.
2010-08-27 Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com>
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
PR libgcj/40868
* configure.ac: Add GCC_FOR_ECJX variable. Ensure
GCJ_FOR_ECJX is always set.
* Makefile.am [!NATIVE] (ecjx.$(OBJEXT)): New rule.
* Makefile.in: Regenerate.
* configure: Regenerate.
* gcj/Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
2010-08-18 Jack Howarth <howarth@bromo.med.uc.edu>
* libjava/configure.ac (THREADLIBS): Don't set on Darwin.
(THREADSPEC): Likwise.
* libjava/configure: Regenerate.
* libjava/Makefile.am: Define LIBJAVA_LDFLAGS_LIBMATH as
-lm only if USING_DARWIN_CRT undefined.
(libgcj_tools_la_LIBADD): Replace '-lm' with $(LIBJAVA_LDFLAGS_LIBMATH).
* libjava/Makefile.in: Regenerate.
2010-08-17 Iain Sandoe <iains@gcc.gnu.org>
* include/posix.h: Make substitution of
_darwin10_Unwind_FindEnclosingFunction conditional on
OSX >= 10.6 (Darwin10).
2010-08-12 Tom Tromey <tromey@redhat.com>
* gnu/java/security/jce/prng/natVMSecureRandomWin32.cc
(natGenerateSeed): Add missing "::".
2010-07-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (*-*-solaris2.8): Use alternate thread library.
Add libthread.
(*-*-solaris2.9): Use libthread.
* configure: Regenerate.
2010-07-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* include/sparc-signal.h: Renamed to ...
* include/solaris-signal.h: ... this.
* configure.ac: Use it on any *-*-solaris2* target.
* configure: Regenerate.
* configure.host (i?86-*-solaris2*): Set can_unwind_signal=yes.
* Makefile.am (prims.lo): Add -fno-omit-frame-pointer to AM_CXXFLAGS.
* Makefile.in: Regenerate.
2010-07-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (ANONVERSCRIPT): Handle sun style.
Define ANONVERSCRIPT_GNU, ANONVERSCRIPT_SUN automake conditionals.
* configure: Regenerate.
* Makefile.am [ANONVERSCRIPT]: Protect GNU section with
ANONVERSCRIPT_GNU.
Introduce per-library $(lib)_la_version_arg, $(lib)_la_version_dep
variables.
[ANONVERSCRIPT_GNU] (version_arg): Default ld arg for version map.
(version_dep): Likewise for dependency.
Use them to set the per-library variables.
[!ANONVERSCRIPT]: Provide them vor the unversioned case.
[ANONVERSCRIPT_SUN]: Handle Sun symbol versioning.
(libgcj_la_DEPENDENCIES): Unconditionally use
$(libgcj_la_version_dep).
(libgcj_la_LINK): Add $(libgcj_la_version_arg).
(libgcj_noncore_la_DEPENDENCIES): Unconditionally use
$(libgcj_la_version_dep).
(libgcj_tools_la_LIBADD): Move -lm ...
(libgcj_tools_la_LDFLAGS): ... here.
(libgcj_tools_la_DEPENDENCIES): Add
$(libgcj_tools_la_version_dep).
(libgcj_tools_la_LINK): Add $(libgcj_tools_la_version_arg).
(lib_gnu_awt_xlib_la_DEPENDENCIES): Add
$(lib_gnu_awt_xlib_la_version_dep).
(lib_gnu_awt_xlib_la_LINK): Add
$(lib_gnu_awt_xlib_la_version_arg).
(libgcj_bc_la_DEPENDENCIES): Add $(libgcj_bc_la_version_dep).
(libgcj_bc_la_LINK): $(libgcj_bc_la_version_arg).
[ANONVERSCRIPT && ANONVERSCRIPT_SUN] (%.ver-sun): New pattern rule.
* Makefile.in: Regenerate.
* libgcj.ver: Reformat.
2010-06-10 Peter O'Gorman <peter@pogma.com>
* configure.ac: Set SYSTEMSPEC so that -allow_stack_execute is not
passed to the linker for -dynamiclib or -bundle on darwin.
* configure: Regenerate.
2010-06-09 Iain Sandoe <iains@gcc.gnu.org>
PR bootstrap/43170
* configure: Regenerate.
2010-06-03 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
2010-06-03 Matthias Klose <doko@ubuntu.com>
* libtool-version: Bump soversion.
2010-05-29 Mike Stump <mikestump@comcast.net>
* configure.ac: Add multilib support for gmp. Proper -I and -L
flags for gmp are added.
2010-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac: Redirect grep stdout, stderr to /dev/null instead
of grep -q.
Use -- instead of grep -e.
* configure: Regenerate.
2010-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR libgcj/44216
* configure.ac (libgcj_cv_exidx): Enable AC_LANG_WERROR.
Save and restore werror flag.
* configure: Regenerate.
2010-05-04 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
PR other/43620
* configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
* Makefile.in: Regenerate.
* gcj/Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
2010-05-03 Jack Howarth <howarth@bromo.med.uc.edu>
PR 43839
* testsuite/Makefile.am: Override automake for site.exp creation
and add entry to set libiconv.
* testsuite/Makefile.in: Regenerate.
* testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation):
Add new global variable libiconv to handle alternative libiconv
locations.
2010-04-19 Andrew Haley <aph@redhat.com>
PR libgcj/40860
* configure.ac: Handle --no-merge-exidx-entries.
2010-04-07 Jakub Jelinek <jakub@redhat.com>
* exception.cc (_Jv_Throw): Avoid set but not used warning.
* include/java-assert.h (JvAssertMessage, JvAssert): Use argument in
sizeof to avoid set but not used warnings.
2010-04-07 Jason Merrill <jason@redhat.com>
* gnu/gcj/runtime/natSharedLibLoader.cc (findCore): Move
declaration of _Jv_create_core out of the function.
2010-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.in: Regenerate.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* gcj/Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
2010-03-21 Dave Korn <dave.korn.cygwin@gmail.com>
PR target/42811
* configure.ac (DLLTOOL): Call AC_CHECK_TOOL.
(libgcj_sublib_core_extra_deps): New host-dependent configure var.
(LIBGCJ_SUBLIB_CORE_EXTRA_DEPS): AC_SUBST it.
* configure.host (libgcj_sublib_core_extra_deps): Define
appropriately on Cygwin and MinGW.
(libgcj_sublib_core_extra_deps): Add libgcj-noncore-dummy import
stub library on Cygwin and MinGW.
* Makefile.am (LIBJAVA_CORE_EXTRA): Import AC_SUBST'd
LIBGCJ_SUBLIB_CORE_EXTRA_DEPS if building sublibs, else define empty.
(libgcj_la_DEPENDENCIES): Use it.
(DLL_VERSION): New makefile macro.
(libgcj-noncore-dummy.dll.a): New build rule for dummy import stub
library.
(libgcj_noncore_la_LIBADD): Trim superfluous convenience libs.
(AM_MAKEFLAGS): Add DLLTOOL recursive propagation.
* libgcj-noncore-dummy.def: New file.
* Makefile.in: Regenerate.
* include/Makefile.in: Likewise.
* testsuite/Makefile.in: Likewise.
* configure: Likewise.
* gcj/Makefile.in: Likewise.
2010-03-21 Dave Korn <dave.korn.cygwin@gmail.com>
PR target/42811 (prerequisite)
* jvmti.cc (_Jv_GetJVMTIEnv): Avoid use of uninitialised memory.
2010-03-13 Matthias Klose <doko@ubuntu.com>
PR libgcj/42676
* Regenerate .h files for anonymous inner classes.
2010-03-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.host (mips-sgi-irix6*): Don't set libgcj_interpreter.
2010-02-24 Andrew Haley <aph@redhat.com>
PR java/40816
* include/jni_md.h: jboolean is an unsigned type.
2010-02-02 Jack Howarth <howarth@bromo.med.uc.edu>
PR java/41991
* include/posix.h: Redefine _Unwind_FindEnclosingFunction.
2010-01-26 Andrew Haley <aph@redhat.com>
* java/lang/natClass.cc (registerClosure): Make sure closures is
non NULL.
2010-01-19 Matthias Klose <doko@ubuntu.com>
* Regenerate .class files.
* classpath/lib/java/security/VMSecureRandom*.class: Remove.
2010-01-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.am (write_entries_to_file): Use \012 instead of \n
with tr.
* scripts/makemake.tcl: Likewise.
* sources.am: Regenerate.
* Makefile.in: Regenerate.
2010-01-09 Jakub Jelinek <jakub@redhat.com>
* gnu/gcj/convert/Convert.java (version): Update copyright notice
dates.
* gnu/gcj/tools/gcj_dbtool/Main.java (main): Likewise.
2010-01-06 Matthias Klose <doko@ubuntu.com>
* Regenerate .class files with updated ecj.jar (based on 3.5.1).

View File

@ -1,246 +0,0 @@
2011-12-27 Uros Bizjak <ubizjak@gmail.com>
PR libgcj/49193
* sysdep/alpha/locks.h (compare_and_swap): Call
__sync_bool_compare_and_swap.
(release_set): Call __sync_synchronize.
2011-12-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (i?86-*-linux*): Set SIGNAL_HANDLER_AUX.
* configure: Regenerate.
* include/i386-signal.h: Wrap in __i386__, include
java-signal-aux.h otherwise.
2011-12-12 Kai Tietz <ktietz@redhat.com>
PR libgcj/50053
* java/lang/natClass.cc (java::lang::Class::newInstance): Special case
member-call for 32-bit IA native Window target.
2011-11-24 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/50888
* prims.cc: Don't include ctype.h.
(c_isspace): Define.
(next_property_key, next_property_value): Use it instead
of isspace.
2011-11-21 Andreas Tobler <andreast@fgznet.ch>
* configure.ac: Fix FreeBSD 10 detection.
* configure: Regenerate.
2011-10-17 Paul Brook <paul@codesourcery.com>
* exception.cc (parse_lsda_header): hardcode ttype_encoding for older
ARM EABI toolchains.
(get_ttype_entry) Remove __ARM_EABI_UNWINDER__ variant.
2011-10-16 Uros Bizjak <ubizjak@gmail.com>
Eric Botcazou <ebotcazou@adacore.com>
PR target/50737
* include/dwarf2-signal.h [__alpha__]: Remove MAKE_THROW_FRAME
definition.
2011-08-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* exception.cc (std::abort): Remove static.
2011-08-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (THREADS): Remove posix95.
* configure: Regenerate.
2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (GCC_UNWIND_INCLUDE): Rename to
LIBGCC_UNWIND_INCLUDE.
Point to $(multi_basedir)/./libjava/../libgcc.
* configure: Regenerate.
* Makefile.am (GCC_UNWIND_INCLUDE): Reflect this.
* Makefile.in: Regenerate.
2011-07-12 Andrew Haley <aph@redhat.com>
* interpret.cc (check_handler): Fix bit rot.
(breakpoint_at): Likewise.
2011-07-12 Andrew Haley <aph@redhat.com>
* java/lang/natClass.cc (finalize): Make sure that the class
really has an engine.
2011-07-07 Matthias Klose <doko@ubuntu.com>
* libtool-version: Bump soversion.
2011-07-07 Matthias Klose <doko@ubuntu.com>
* sysdep/x86-64: Remove empty directory.
2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR target/39150
* configure.host (x86_64-*): Add -Usun to libgcj_flags.
(x86_64-*-solaris2.1[0-9]*): New case.
(i?86-*-solaris2*): Also accept x86_64-*-solaris2.1[0-9]*.
2011-06-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR libgcj/49314
* gnu/gcj/convert/natIconv.cc (iconv_init): Pad in[] with NUL byte.
2011-06-17 Jack Howarth <howarth@bromo.med.uc.edu>
PR target/49461
* libjava/configure.ac (SYSTEMSPEC): Pass -no_pie for darwin11.
* libjava/configure: Regenerate.
2011-06-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR libgcj/49315
* include/solaris-signal.h: Rename to ...
* include/posix-signal.h: ... this.
(SA_FLAGS): Define.
(SIGNAL_HANDLER): Handle non-SA_SIGINFO case.
(sa_signal_handler): Define.
(_INIT_SIG_HANDLER): New macro.
(INIT_SEGV, INIT_FPE): Use it.
* configure.ac (SIGNAL_HANDLER): Use it on alpha*-dec-osf*,
mips-sgi-irix*, *-*-solaris2*
* configure: Regenerate.
* include/aix-signal.h: Refer to AIX.
* configure.host (alpha*-dec-osf*): Enable can_unwind_signal.
(mips-sgi-irix6*): Likewise.
2011-05-31 H.J. Lu <hongjiu.lu@intel.com>
PR libgcj/49193
* configure.host (sysdeps_dir): Set to i386 for x86_64.
* sysdep/i386/locks.h (compare_and_swap): Call
__sync_bool_compare_and_swap.
(release_set): Call write_barrier ().
* sysdep/x86-64/locks.h: Removed.
2011-04-24 Gerald Pfeifer <gerald@pfeifer.com>
* README: Refer to our generic bug reporting page.
2011-04-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (THREADS): Remove decosf1, irix, mach, os2.
* configure: Regenerate
2011-04-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation):
Add $libiconv to cxxflags for alpha*-dec-osf*.
2011-04-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR testsuite/21164
* testsuite/lib/libjava.exp: Load dg.exp.
* testsuite/libjava.jar/jar.exp (gcj_jar_interpret): Strip srcdir
from jarfile.
Use result for messages.
* testsuite/libjava.loader/loader.exp (gcj_loader_test_one): Pass
errname to libjava_invoke, fix testname.
2011-04-08 Kai Tietz <ktietz@redhat.com>
* configure.ac (libgcj_ld_export_all): Set for windows
native targets to export-all-symbols.
(LIBGCJ_LD_EXPORT_ALL): Export libgcj_ld_export_all.
* Makefile.am (libgcj_la_LDFLAGS): Add LIBGCJ_LD_EXPORT_ALL.
* sysdep/i386/backtrace.h (MAIN_FUNC): Define for windows
native targets to DllMain.
* gcj/javaprims.h (JNICALL): Define it dependent
for different windows targets.
* include/jni_md.h: Likewise.
* headers.txt (_Jv_JNI_ToReflectedField): Mark
JNICALLS for friends.
(_Jv_JNI_ToReflectedMethod): Likewise.
* java/lang/Class.h: Regenerated.
* java/lang/reflect/Field.h: Regenerated.
* java/lang/reflect/Constructor.h: Regenerated.
* java/lang/reflect/Method.h: Regenerated.
* configure: Regenerated.
* Makefile.in: Regenerated.
* include/Makefile.in: Regenerated.
* testsuite/Makefile.in: Regenerated.
* gcj/Makefile.in: Regenerated.
2011-04-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac: Redirect $JAR -cf@ output to /dev/null.
* configure: Regenerate.
2011-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (THREADS): Remove solaris.
* configure: Regenerate.
2011-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR bootstrap/48135
* configure.ac (libjava_cv_anon_version_script): Handle
--disable-symvers.
* configure: Regenerate.
2011-02-14 Gary Benson <gbenson@redhat.com>
* libjava/contrib/aot-compile.in: Add our module directory
to the start of the search path rather than the end.
* libjava/contrib/aot-compile-rpm.in: Likewise.
2011-02-14 Gary Benson <gbenson@redhat.com>
PR libjava/47484
* configure.ac (python_mod_dir, python_mod_dir_expanded):
Install Python modules into versioned directory.
* configure: Regenerate.
2011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
* shlibpath.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER): Remove handling
of freebsd1* which soon would incorrectly match FreeBSD 10.0.
2011-02-04 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
PR java/21206
* configure.ac (LDLIBICONV): New substituted variable, with
instances of '-Wl,' removed from LIBICONV.
* configure: Regenerate.
* libgcj.spec.in: Use @LDLIBICONV@ not @LIBICONV@.
* Makefile.in: Regenerate.
* gcj/Makefile.in: Likewise.
* include/Makefile.in: Likewise.
* testsuite/Makefile.in: Likewise.
2011-02-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac: Don't use libdl on mips-sgi-irix6*.
* configure: Regenerate.
2011-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation):
Add -shared-libgcc to cxxflags for *-*-solaris*.
Remove -lsocket.
2011-01-03 Jakub Jelinek <jakub@redhat.com>
* gnu/gcj/convert/Convert.java (version): Update copyright notice
dates.
* gnu/gcj/tools/gcj_dbtool/Main.java (main): Likewise.
Copyright (C) 2011 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.

View File

@ -1,240 +0,0 @@
2012-12-19 Matthias Klose <doko@ubuntu.com>
Import GNU Classpath (20121202).
* Regenerate class and header files.
* Regenerate auto* files.
* sources.am, gcj/javaprims.h: Regenerate.
* gnu/java/nio/FileLockImpl.java (close): New override.
2012-12-12 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.am (lib_gnu_awt_xlib_la_CPPFLAGS): Use
$(LIBSTDCXX_RAW_CXX_CXXLAGS).
(lib_gnu_awt_xlib_la_LDFLAGS): Use $(LIBSTDCXX_RAW_CXX_LDLAGS).
* configure.ac (GCC_LIBSTDCXX_RAW_CXX_FLAGS): New.
* aclocal.m4: Regenerated.
* Makefile.in:Likewise.
* configure: Likewise.
2012-11-19 Matthias Klose <doko@ubuntu.com>
* libtool-version: Bump soversion.
2012-10-15 Matthias Klose <doko@ubuntu.com>
* configure.ac: Match arm*-*-linux-* for ARM Linux/GNU.
* configure: Regenerate.
2012-09-14 Dehao Chen <dehao@google.com>
* testsuite/libjava.lang/sourcelocation.java: New cases.
* testsuite/libjava.lang/sourcelocation.out: New cases.
2012-09-14 David Edelsohn <dje.gcc@gmail.com>
* configure: Regenerated.
2012-07-19 Tristan Gingold <gingold@adacore.com>
Richard Henderson <rth@redhat.com>
* libgcj.ver: Add __gcj_personality_seh0.
* exception.cc (__gcj_personality_seh0): New function.
Adjust for SEH.
2012-07-18 H.J. Lu <hongjiu.lu@intel.com>
PR libjava/53973
* include/x86_64-signal.h (CHECK_67H_PREFIX): Removed.
(HANDLE_DIVIDE_OVERFLOW): Skip 67h address size prefix
unconditionally.
2012-07-18 H.J. Lu <hongjiu.lu@intel.com>
PR libjava/53973
* include/x86_64-signal.h (CHECK_67H_PREFIX): New.
(HANDLE_DIVIDE_OVERFLOW): Check and and skip 67h address size
prefix if CHECK_67H_PREFIX is 1. Use ULL suffix for 64-bit
integer.
2012-06-20 David Edelsohn <dje.gcc@gmail.com>
Alan Modra <amodra@gmail.com>
* sysdep/powerpc/locks.h (compare_and_swap): Use GCC atomic
intrinsics.
(release_set): Same.
(compare_and_swap_release): Same.
(read_barrier): Same.
(write_barrier): Same.
2012-06-15 Andreas Schwab <schwab@linux-m68k.org>
* sysdep/m68k/locks.h (compare_and_swap): Use
__sync_bool_compare_and_swap.
(release_set): Use write_barrier instead of inlining it.
2012-06-15 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* sysdep/s390/locks.h (compare_and_swap, release_set)
(read_barrier, write_barrier): Use the GCC atomic builtins.
2012-06-14 Kaz Kojima <kkojima@gcc.gnu.org>
* sysdep/sh/locks.h (__cas_lock): Remove.
(__cas_start_atomic, __cas_end_atomic): Likewise.
(compare_and_swap): Call __sync_bool_compare_and_swap.
2012-05-21 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/52700
* configure.ac: Allow gnu, gnu-versioned-namespace for
--enable-symvers arguments.
* configure: Regenerate.
2012-05-16 H.J. Lu <hongjiu.lu@intel.com>
* configure: Regenerated.
2012-04-23 Andrew Haley <aph@redhat.com>
* defineclass.cc (MAJOR_1_7, MINOR_1_7): New.
(parse): Allow MAJOR_1_7 classfile version.
2012-04-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR libgcj/52645
* gnu/java/net/natPlainDatagramSocketImplPosix.cc (setOption):
Restore HAVE_INET6 check.
* gnu/java/net/natPlainDatagramSocketImplWin32.cc (setOption):
Likewise.
2012-03-25 Gerald Pfeifer <gerald@pfeifer.com>
PR libgcj/52694
* java/io/natVMConsole.cc (IUCLC): Define, if undefined.
2012-03-16 Andrew John Hughes <ahughes@redhat.com>
* Makefile.am: Add natVMConsole.cc.
* Makefile.in: Regenerated.
* gcj/Makefile.in: Likewise.
* gcj/javaprims.h: Classes updated.
* gnu/javax/crypto/key/dh/GnuDHKeyPairGenerator.h,
* gnu/javax/net/ssl/provider/CipherSuite.h,
* gnu/javax/net/ssl/provider/OutputSecurityParameters.h,
* include/Makefile.in:
Regenerated.
* java/io/Console.h,
* java/io/IOError.h,
* java/io/ObjectOutputStream$2.h:
Initial generation.
* java/io/ObjectOutputStream.h: Regenerated.
* java/io/VMConsole.h: Initial generation.
* java/io/VMConsole.java: Copied from classpath/vm/reference.
* java/io/natVMConsole.cc: Implemented readPassword.
* java/nio/channels/spi/SelectorProvider$1.h,
* java/security/KeyStore$1.h:
Initial generation.
* java/security/ProtectionDomain.h,
* java/text/DateFormatSymbols.h,
* java/util/HashMap.h,
* java/util/regex/Matcher.h,
* java/util/regex/Pattern.h:
Regenerated.
* javax/xml/stream/util/ReaderDelegate.h:
Removed.
* sources.am,
* testsuite/Makefile.in:
Regenerated.
2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (THREADLIBS): Remove *-*-solaris2.8 handling.
* configure: Regenerate.
2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (libgcj_cv_exidx): Remove IRIX 6 ld workaround.
(mips-sgi-irix6*): Remove.
(mips-sgi-irix*): Remove.
(AC_CHECK_HEADERS): Remove bstring.h.
* configure: Regenerate.
* include/config.h.in: Regenerate.
* configure.host (mips-sgi-irix6*): Remove.
* include/posix-signal.h [__sgi__]: Remove.
* gnu/java/net/natPlainDatagramSocketImplPosix.cc
[HAVE_BSTRING_H]: Remove.
* gnu/java/net/natPlainDatagramSocketImplWin32.cc: Likewise.
* gnu/java/net/natPlainSocketImplPosix.cc: Likewise.
2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (alpha*-dec-osf*): Remove.
* configure: Regenerate.
* configure.host (alpha*-dec-osf*): Remove.
* gnu/java/net/natPlainDatagramSocketImplPosix.cc (setOption): Use
IPV6_MULTICAST_IF unconditionally.
* gnu/java/net/natPlainDatagramSocketImplWin32.cc (setOption):
Likewise.
* gnu/java/net/natPlainSocketImplPosix.cc
(gnu::java::net::PlainSocketImpl::accept): Use ::accept instead of
_Jv_accept.
* include/posix-signal.h [__alpha__ && __osf__]: Remove.
* include/posix.h (_POSIX_PII_SOCKET): Don't define.
(_Jv_accept): Remove.
* java/io/File.java (File._access): Rename to access.
Change callers.
(File._stat): Likewise.
* java/io/File.h: Regenerate.
* classpath/lib/java/io/File.class: Regenerate.
* java/io/natFilePosix.cc (java::io::File::_access): Rename to
access.
(java::io::File::_stat): Rename to stat.
* java/io/natFileWin32.cc: Likewise.
* testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation):
Remove alpha*-dec-osf* handling.
* testsuite/libjava.jvmti/jvmti-interp.exp
(gcj_jni_compile_c_to_so): Likewise.
* testsuite/libjava.jvmti/jvmti.exp (gcj_jvmti_compile_cxx_to_o):
Likewise.
2012-02-23 Patrick Marlier <patrick.marlier@gmail.com>
Jack Howarth <howarth@bromo.med.uc.edu>
PR target/49461
* configure.ac (SYSTEMSPEC): No longer pass -no_pie for darwin11.
* configure: Regenerate.
2012-02-02 Kai Tietz <ktietz@redhat.com>
PR libjava/48512
* configure.ac (THREADSTARTFILESPEC): Don't add crtmet.o file for
w64 windows targets.
* configure: Regenerated.
2012-02-01 Kai Tietz <ktietz@redhat.com>
PR target/51500
* interpret.cc (_Jv_init_cif): Handle thiscall
convention for 32-bit Windows.
* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA):
Likewise.
* java/lang/reflect/natVMProxy.cc (invoke_t): Add
thiscall-attribute for 32-bit Windows.
2012-01-01 Jakub Jelinek <jakub@redhat.com>
* gnu/gcj/convert/Convert.java (version): Update copyright notice
dates.
* gnu/gcj/tools/gcj_dbtool/Main.java (main): Likewise.
Copyright (C) 2012 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.

View File

@ -1,68 +0,0 @@
2013-12-09 Andreas Schwab <schwab@suse.de>
* Makefile.am (toolexeclib_LTLIBRARIES) [USE_LIBGCJ_BC]: Use
install/libgcj_bc.la instead of libgcj_bc.la.
(noinst_LTLIBRARIES) [USE_LIBGCJ_BC]: Define.
(install_libgcj_bc_la_SOURCES): Define.
(install/libgcj_bc.la): New rule.
* Makefile.in: Regenerate.
2013-09-20 Alan Modra <amodra@gmail.com>
* configure: Regenerate.
2013-06-20 Roland Lutz <rlutz@hedmen.org>
* contrib/aot-compile.in: Fix typo in option list.
2013-06-20 Matthias Klose <doko@ubuntu.com>
* pkg.m4 (PKG_CHECK_MODULES): Use AC_PATH_TOOL to check for pkg-config.
* classpath/m4/pkg.m4 (PKG_CHECK_MODULES): Likewise.
* configure: Regenerate.
* classpath/configure: Regenerate.
2013-06-20 Matthias Klose <doko@ubuntu.com>
* libtool-version: Bump soversion.
2013-05-22 Mark Mitchell <mark@codesourcery.com>
Sandra Loosemore <sandra@codesourcery.com>
* configure.ac (dbexecdir): Base on $(toolexeclibdir), not
$(libdir).
* Makefile.am (pkgconfigdir): Likewise.
* configure: Regenerated.
* Makefile.in: Regenerated.
* gcj/Makefile.in: Regenerated.
* include/Makefile.in: Regenerated.
* testsuite/Makefile.in: Regenerated.
2013-04-16 Andreas Schwab <schwab@suse.de>
* configure.host: Add support for aarch64.
* sysdep/aarch64/locks.h: New file.
2013-03-12 Andrew John Hughes <gnu.andrew@redhat.com>
* include/posix-threads.h:
(_Jv_MutexCheckMonitor(_Jv_Mutex_t)): Use
pthread_equal rather than !=.
2013-01-07 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.am (lib_gnu_awt_xlib_la_LDFLAGS): Replace
LIBSTDCXX_RAW_CXX_LDLAGS with LIBSTDCXX_RAW_CXX_LDFLAGS.
* Makefile.in: Regenerated.
2013-01-03 Jakub Jelinek <jakub@redhat.com>
* gnu/gcj/convert/Convert.java (version): Update copyright notice
dates.
* gnu/gcj/tools/gcj_dbtool/Main.java (main): Likewise.
Copyright (C) 2013 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.

View File

@ -1,66 +0,0 @@
2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
PR bootstrap/63784
* configure: Regenerated.
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
2014-05-20 Sebastian Huber <sebastian.huber@embedded-brains.de>
* testsuite/lib/libjava.exp (load_gcc_lib): Register loaded libs.
2014-05-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
Fix current cygwin-64 build problems.
* configure.host: Added handling for x86_64-*-cygwin/mingw.
* boehm.cc (_Jv_GCAttachThread, _Jv_GCDetachThread): Don't compile if
GC_WIN32_THREADS is defined.
* java/lang/natClass.cc (_Jv_InterfaceAssignableFrom): Rename interface
to source_interface.
2014-04-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (THREADLIBS, THREADSPEC): Remove *-*-solaris2.9
handling.
* configure: Regenerate.
2014-03-12 Uros Bizjak <ubizjak@gmail.com>
* include/dwarf2-signal.h: Update copyright year.
(SIGNAL_HANDLER): Remove _sip argument. Mark _p argument with
__attribute__ ((__unused__)).
(class java::lang::Throwable): Remove declaration.
(MAKE_THROW_FRAME) [!__ia64__]: Define as empty definition.
2014-03-11 Uros Bizjak <ubizjak@gmail.com>
* java/lang/natObject.cc (_Jv_MonitorEnter): Add missing parenthesis
around comparison with (address | LOCKED) in JvAssert.
2014-02-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR libgcj/55637
* testsuite/libjava.lang/sourcelocation.xfail: New file.
2014-02-18 Richard Biener <rguenther@suse.de>
PR libjava/60261
* configure.ac (dbexecdir): Remove redundant multilib addition.
* Makefile.am (gcc_version): Export.
* configure: Regenerate.
* Makefile.in: Likewise.
2014-01-02 Tobias Burnus <burnus@net-b.de>
* gnu/gcj/convert/Convert.java (version): Update copyright notice
dates.
* gnu/gcj/tools/gcj_dbtool/Main.java (main): Ditto.
Copyright (C) 2014 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.

View File

@ -1,69 +0,0 @@
2015-07-24 Michael Darling <darlingm@gmail.com>
PR other/66259
* configure: Reflects renaming of configure.in to configure.ac
2015-05-28 Andreas Tobler <andreast@gcc.gnu.org>
* configure.host: Add bits for FreeBSD amd64 and i386.
* configure.ac: Add signal handler for FreeBSD (amd64/i386)
* configure: Regenerate.
* include/freebsd-signal.h: New file.
2015-05-26 Andreas Tobler <andreast@gcc.gnu.org>
* testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation): Add
libiconv for FreeBSD to cxxflags.
2015-05-24 Eric Botcazou <ebotcazou@adacore.com>
* configure: Regenerate.
2015-05-13 Eric Botcazou <ebotcazou@adacore.com>
* configure.ac: Include config/sjlj.m4.
Remove manual SJLJ check, add GCC_CHECK_SJLJ_EXCEPTIONS and adjust.
* include/config.h.in: Regenerate.
* exception.cc: Replace SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__.
* stacktrace.cc: Likewise.
* include/default-signal.h: Likewise.
* sysdep/i386/backtrace.h: Likewise.
2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
* Makefile.in: Regenerated with automake-1.11.6.
* aclocal.m4: Likewise.
* configure: Likewise.
* gcj/Makefile.in: Likewise.
* include/Makefile.in: Likewise.
* testsuite/Makefile.in: Likewise.
2015-01-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
* libtool-version: Add a comment about cygwin.
2015-01-21 Matthias Klose <doko@ubuntu.com>
* libtool-version: Bump soversion.
2015-01-13 Jakub Jelinek <jakub@redhat.com>
PR libgcj/64219
* Makefile.am (install-data-local): Use just the major version
from GCJVERSION instead of major.minor.
* Makefile.in: Regenerated.
2015-01-05 Jakub Jelinek <jakub@redhat.com>
* classpath/gnu/java/rmi/registry/RegistryImpl.java (version): Update
copyright notice dates.
* classpath/tools/gnu/classpath/tools/orbd/Main.java (run): Ditto.
* gnu/gcj/convert/Convert.java (version): Update copyright notice
dates.
* gnu/gcj/tools/gcj_dbtool/Main.java (main): Ditto.
Copyright (C) 2015 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.

View File

@ -1,190 +0,0 @@
Things libgcj hackers should know
---------------------------------
If you want to hack on the libgcj files you need to be aware of the
following things. There are probably lots of other things that should be
explained in this HACKING file. Please add them if you discover them :)
--
If you plan to modify a .java file, you will need to configure with
--enable-java-maintainer-mode. In order to make this work properly,
you will need to have 'ecj1' and 'gjavah' executables in your PATH at
build time.
One way to do this is to download ecj.jar (see contrib/download_ecj)
and write a simple wrapper script like:
#! /bin/sh
gij -cp /home/tromey/gnu/Generics/trunk/ecj.jar \
org.eclipse.jdt.internal.compiler.batch.GCCMain \
${1+"$@"}
For gjavah, you can make a tools.zip from the classes in
classpath/lib/tools/ and write a gjavah script like:
#! /bin/sh
dir=/home/tromey/gnu/Generics/Gcjh
gij -cp $dir/tools.zip \
gnu.classpath.tools.javah.Main \
${1+"$@"}
Another way to get a version of gjavah is to first do a
non-maintainer-mode build and use the newly installed gjavah.
--
To regenerate libjava/configure, first run aclocal passing the flags
found near the top of Makefile.am, then autoconf. H. J. Lu writes that
this can be done using these commands:
cd libjava &&
rm -f aclocal.m4 &&
ACFLAGS=$(grep "^ACLOCAL_AMFLAGS" Makefile.in | sed -e "s/ACLOCAL_AMFLAGS[ \t ]*=//") &&
aclocal-1.11 $ACFLAGS &&
rm -f configure &&
autoconf-2.64 &&
rm -fr autom4te.cache
See the GCC documentation which auto* versions to use.
--
libgcj uses GNU Classpath as an upstream provider. Snapshots of
Classpath are imported into the libgcj source tree. Some classes are
overridden by local versions; these files still appear in the libgcj
tree.
To import a new release:
- Check out a classpath snapshot or take a release tar.gz file.
I use 'cvs export' for this. Make a tag to ensure future hackers
know exactly what revision was checked out; tags are of the form
'libgcj-import-DATE' (when using a tagged checkout do:
- ./autogen.sh && ./configure && make dist
to get a proper .tar.gz for importing below).
- Get a svn checkout of
svn+ssh://gcc.gnu.org/svn/gcc/branches/CLASSPATH/libjava/classpath
this contains "pure" GNU Classpath inside the GCC tree.
- Clean it up and get the files from a new version:
- find classpath -type f | grep -v '/\.svn' | grep -v '/\.cvs' | xargs rm
- tar zxf classpath-x.tar.gz
- cp -r classpath-x/* classpath
- Add/Remove files:
- svn status classpath | grep ^\! | cut -c8- | xargs svn remove
- svn status classpath | grep ^\? | cut -c8- | xargs svn add
- If there are any empty directories now they can be removed. You can find
candidates (dirs with files removed) with:
- for i in `svn status classpath | grep ^D | cut -c8-`; \
do ls -d `dirname $i`; done | uniq
- Update vendor branch
- svn commit classpath
- Note the new revision number (Xrev)
- Get a fresh svn trunk checkout and cd gcc/libjava
- Merge the changes between classpath versions into the trunk.
svn merge -rXrev-1:Xrev \
svn+ssh://gcc.gnu.org/svn/gcc/branches/CLASSPATH/libjava/classpath \
classpath
- Resolve any conflicts pointed out by svn status classpath | grep ^C
- Makefile.in files will be regenerated in the next step.
- Other files should have a "GCJ LOCAL" comment, and/or are mentioned
in the classpath/ChangeLog.gcj file.
(Don't forget to svn resolved files.)
- Use auto* to create configure, Makefile.in, etc
Make sure you have Automake 1.11.1 installed. Exactly that version!
You have to make sure to use the gcc libtool.m4 and gcc lt* scripts
cd .../classpath
cp ../../lt* .
cp ../../config.sub ../../config.guess .
aclocal -I m4 -I ../.. -I ../../config
autoconf
autoheader
automake
rm -rf autom4te.cache
cd ..
scripts/makemake.tcl > sources.am
automake
- Remove the generated class and header files:
find classpath -name '*.class' | xargs -r rm -f
find gnu java javax org sun -name '*.h' \
| xargs -r grep -Fl 'DO NOT EDIT THIS FILE - it is machine generated' \
| xargs -r rm -f
- Build, fix, till everything works.
Be sure to build all peers (--enable-java-awt=gtk,xlib,qt
--enable-gconf-peer --enable-gstreamer-peer).
Be sure to build gjdoc (--enable-gjdoc).
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-java-maintainer-mode and you
will need to update the .class files and generated CNI header files in
your working tree
- Add/Remove newly generated files:
- svn status classpath | grep '^!.*\.class$' | cut -c8- | xargs svn remove
- svn status classpath | grep '^?' | cut -c8- | xargs svn add
- svn status gnu java javax org sun | grep '^!.*\.h$' | cut -c8- | xargs svn remove
- svn status gnu java javax org sun | grep '^?' | cut -c8- | xargs svn add
Over time we plan to remove as many of the remaining divergences as
possible.
File additions and deletions require running scripts/makemake.tcl
before running automake.
--
In general you should not make any changes in the classpath/
directory. Changes here should come via imports from upstream.
However, there are three (known) exceptions to this rule:
* In an emergency, such as a bootstrap breakage, it is ok to commit a
patch provided that the problem is resolved (by fixing a compiler
bug or fixing the Classpath bug upstream) somehow and the resolution
is later checked in (erasing the local diff).
* On a release branch to fix a bug, where a full-scale import of
Classpath is not advisable.
* We maintain a fair number of divergences in the build system.
This is a pain but they don't seem suitable for upstream.
--
You can develop in a GCC tree using a CVS checkout of Classpath, most
of the time. (The exceptions are when an incompatible change has been
made in Classpath and some core part of libgcj has not yet been
updated.)
The way to set this up is very similar to importing a new version of
Classpath into the libgcj tree. In your working tree:
* cd gcc/libjava; rm -rf classpath
* cvs co classpath
* cd classpath
Now run the auto tools as specified in the import process; then
cd ..
* Run 'scripts/makemake.tcl > sources.am' in the source tree
* Run automake for libgcj
Now you should be ready to go.
If you are working in a tree like this, you must remember to run
makemake.tcl and automake whenever you update your embedded classpath
tree.
--
If you add a class to java.lang, java.io, or java.util
(including sub-packages, like java.lang.ref).
* Edit gcj/javaprims.h
* Go to the `namespace java' line, and delete that entire block (the
entire contents of the namespace)
* Then insert the output of `perl scripts/classes.pl' into the file
at that point. This must be run from the source tree, in
libjava/classpath/lib; it uses the .class file name to determine
what to print.

View File

@ -1,26 +0,0 @@
Jan 21, 2002
The libgcj library is licensed under the terms of the GNU General
Public License.
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.
You should have received a copy of the GNU General Public License
along with libjava; see the file COPYING. If not, write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,621 +0,0 @@
*** Changes in GCC 4.1:
Core library (libgcj) updates based on GNU Classpath 0.15 - 0.19+
- Networking
* The java.net.HttpURLConnection implementation no longer buffers the
entire response body in memory. This means that response bodies
larger than available memory can now be handled.
- (N)IO
* NIO FileChannel.map implementation, fast bulk put implementation for
DirectByteBuffer (speeds up this method 10x).
* FileChannel.lock() and FileChannel.force() implemented.
- XML
* gnu.xml fix for nodes created outside a namespace context.
* Add support for output indenting and cdata-section-elements output
instruction in xml.transform.
* xml.xpath corrections for cases where elements/attributes might have
been created in non-namespace-aware mode. Corrections to handling of
XSL variables and minor conformance updates.
- AWT
* Qt4 configury switches for OS-X. Additional to the --enable-qt-peer, OS-X
users with a Qt4 installation can build the qt-peers with the argument
--with-qt4dir=<Qt4-installation-dir>.
* GNU JAWT implementation, the AWT Native Interface, which allows direct
access to native screen resources from within a Canvas's paint method.
GNU Classpath Examples comes with a Demo,
see libjava/classpath/examples/README.
* awt.datatransfer updated to 1.5 with supports for FlavorEvents.
The gtk+ awt peers now allow copy/paste of text, images, uris/files
and serialized objects with other applications and tracking
clipboard change events with gtk+ 2.6 (for gtk+ 2.4 only text and
serialized objects are supported). A GNU Classpath Examples
datatransfer Demo was added to show the new functionality.
* Split gtk+ awt peers event handling in two threads and improve gdk lock
handling (solves several AWT lock ups).
* Speed up awt Image loading.
* Better GTK scrollbar peer implementation when using GTK >= 2.6.
* Handle image loading errors correctly for gdkpixbuf and MediaTracker.
* Better handle GDK lock. Properly prefix gtkpeer native functions (cp_gtk).
* GdkGraphics2D has been updated to use Cairo 0.5.x APIs.
* BufferedImage and GtkImage rewrites. All image drawing operations
should now work correctly (flipping requires gtk+ >= 2.6)
* Future Graphics2D, Image and Text work is documented at:
http://developer.classpath.org/mediation/ClasspathGraphicsImagesText
* When gtk+ 2.6 or higher is installed the default log handler will produce
stack traces whenever a WARNING, CRITICAL or ERROR message is produced.
- Free Swing
* The Swing RepaintManager has been reworked for more efficient painting,
especially for large GUIs.
* The Swing layout manager OverlayLayout has been implemented, the BoxLayout
has been rewritten to make use of the SizeRequirements utility class and
caching for more efficient layout.
* Improved accessibility support for Swing.
* Significant progress has been made in the implementation of the
javax.swing.plaf.metal.* package, with most UI delegates in a working state
now. Please test this with your own applications and provide feedback that
will help us to improve this package.
* The GUI demo (gnu.classpath.examples.swing.Demo) has been extended to
highlight various features in our free-swing implementation. And includes
a look and feel switcher (Metal default, Ocean or GNU).
* The javax.swing.plaf.multi.* package is now implemented.
* Editing and several key actions for JTree and JTable were implemented.
* Lots of icons and look and feel improvements for Free Swing basic and
metal themes were added. Try running the GNU Classpath Swing Demo in
examples (gnu.classpath.examples.swing.Demo) with:
-Dswing.defaultlaf=javax.swing.plaf.basic.BasicLookAndFeel
-Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel
* Start of styled text capabilites for java.swing.text.
* DefaultMutableTreeNode preorder, postorder, depthFirst and breadthFirst
traversal enumerations implemented.
* JInternalFrame colors and titlebar draw properly.
* JTree is working up to par (icons, selection and keyboard traversal).
* JMenus were made more compatible in visual and programmatic behavior.
* JTable changeSelection and multiple selections implemented.
* JButton and JToggleButton change states work properly now.
* JFileChooser fixes.
* revalidate and repaint fixes which make Free Swing much more responsive.
* MetalIconFactory implemented.
* Free Swing Top-Level Compatibility. JFrame, JDialog, JApplet,
JInternalFrame, and JWindow are now 1.5 compatible in the sense that you
can call add() and setLayout() directly on them, which will have the same
effect as calling getContentPane().add() and getContentPane().setLayout().
* The JTree interface has been completed. JTrees now recognizes mouse clicks
and selections work, but the visual implementation is not yet complete.
Work on expansion and collapsing of the tree nodes is being implemented.
* BoxLayout works properly now.
* Fixed GrayFilter to actually work.
* Metal SplitPane implemented.
* Lots of free swing text and editor stuff work now.
- Free RMI and Corba
* The Andrew Watson, Vice President and Technical Director of the Object
Management Group, has officially assigned us 20 bit Vendor Minor Code Id:
0x47430 ("GC") that will mark remote Classpath - specific system exceptions.
Obtaining the VMCID means that GNU Classpath now is a recogniseable type of
node in a highly interoperable CORBA world.
* Classpath now includes the first working draft to support the RMI over
IIOP protocol. The current implementation is capable for remote invocations,
transferring various Serializables and Externalizables via RMI-IIOP protocol.
It can flatten graphs and, at least for the simple cases, is interoperable
with Sun's jdk 1.5.
* org.omg.PortableInterceptor and related functionality in other packages
is now implemented:
- The sever and client interceptors work as required since 1.4.
- The IOR interceptor works as needed for 1.5.
* The org.omg.DynamicAny package is completed and passes the prepared tests.
* The Portable Object Adapter should now support the output of the
recent IDL to java compilers. These compilers now generate servants and
not CORBA objects as before, making the output depended on the existing
POA implementation. Completing POA means that such code can already be
tried to run on Classpath. Our POA is tested for the following usager
scenarios:
- POA converts servant to the CORBA object.
- Servant provides to the CORBA object.
- POA activates new CORBA object with the given Object Id (byte array)
that is later accessible for the servant.
- During the first call, the ServantActivator provides servant for this
and all subsequent calls on the current object.
- During each call, the ServantLocator provides servant for this call
only.
- ServantLocator or ServantActivator forwards call to another server.
- POA has a single servant, responsible for all objects.
- POA has a default servant, but some objects are explicitly connected
to they specific servants.
The POA is verified using tests from the former cost.omg.org.
* The CORBA implementation is now a working prototype that should support
features up till 1.3 inclusive.
We would invite groups writing CORBA dependent applications to
try Classpath implementation, reporting any possible bugs.
The CORBA prototype is interoperable with Sun's implementation v 1.4,
transferring object references, primitive types, narrow and wide
strings, arrays, structures, trees, abstract interfaces and
value types (feature of CORBA 2.3) between these two platforms.
The remote exceptions are transferred and handled correctly.
The stringified object references (IORs) from various sources are
parsed as required.
The transient (for current session) and permanent (till jre restart)
redirections work.
Both Little and Big Endian encoded messages are accepted.
The implementation is verified using tests from the former cost.omg.org.
The current release includes working examples (see the examples directory),
demonstrating the client-server communication, using either CORBA Request
or IDL-based stub (usually generated by a IDL to java compiler).
These examples also show how to use the Classpath CORBA naming service.
The IDL to java compiler is not yet written, but as our library must be
compatible, it naturally accepts the output of other idlj implementations.
- Misc
* Updated TimeZone data against Olson tzdata2005l.
* Make zip and jar UTF-8 "clean".
* "native" code builds and compiles (warning free) on Darwin and Solaris.
* java.util.logging.FileHandler now rotates files.
* Start of a generic JDWP framework in gnu/classpath/jdwp.
This is unfinished, but feedback (at classpath@gnu.org) from runtime
hackers is greatly appreciated. Although most of the work is currently
being done around gcj/gij we want this framework to be as VM neutral as
possible. Early design is described in:
http://gcc.gnu.org/ml/java/2005-05/msg00260.html
* QT4 AWT peers, enable by giving configure --enable-qt-peer.
Included, but not ready for production yet. They are explicitly
disabled and not supported. But if you want to help with the
development of these new features we are interested in feedback. You
will have to explicitly enable them to try them out
(and they will most likely contain bugs).
* Documentation fixes all over the place.
See http://developer.classpath.org/doc/
Thanks! The following people helped with the above new features, bug
reports, testing and integration:
Aaron Luchko (JDWP updates and documentation fixes) Andreas Jaeger
(mprec updates) Andreas Tobler (Darwin and Solaris testing and fixing,
Qt4 support for Darwin/OSX, Graphics2D support, gtk+ updates.) Andrew
Haley (Serialization and URLClassLoader fixes, gcj build speedups)
Andrew John Hughes (Locale and net fixes, URI RFC2986 updates,
Serialization fixes, Properties XML support and generic branch work,
VMIntegration guide update) Andrew Overholt (File locking) Anthony
Balkissoon (JList, Free Swing 1.5 updates and mouse event fixes, Lots
of Free Swing work including JTable editing) Anthony Green (MIDI
framework, ALSA and DSSI providers) Archie Cobbs (Build fixes, VM
interface updates, URLClassLoader updates) Audrius Meskauskas (Lots of
Free Corba, RMI and HTML work plus testing and documenting) Bastiaan
Huisman (TimeZone bug fixing) Bryce McKinlay (RMI work) Casey Marshall
(Crypto algorithm fixes, FileChannel lock, SystemLogger and
FileHandler rotate impl, NIO FileChannel.map support, security and
policy updates) Chris Burdess (Lots of gnu.xml and http protocol
fixes, StAX and dom xml:id support) Christian Schlichtherle (Zip fixes
and cleanups) Christian Thalinger (64-bit cleanups, Configuration and
VM interface fixes and CACAO integration, fdlibm updates) Dalibor
Topic (Better DEBUG support, Build cleanups and Kaffe integration. Qt4
build infrastructure, SHA1PRNG and GdkPixbugDecoder updates) Daniel
Bonniot (Serialization fixes) David Daney (BitSet bugfixes,
HttpURLConnection rewrite and improvements) David Gilbert (Basic and
Metal icon and plaf and lots of documenting, Lots of Free Swing and
metal theme additions. MetalIconFactory implementation) David
Lichteblau (JCL support library global/local reference cleanups) Gael
Thomas (VMClassLoader boot packages support sugestions) Gary Benson
(MessageFormat fixes) Goffredo Baroncelli (HTTPURLConnection fixes)
Guilhem Lavaux (Configuration, thread and channel fixes and Kaffe
integration. JCL native Pointer updates. Logger bug fixes) Ingo
Proetel (Image, Logger and URLClassLoader updates) Ito Kazumitsu
(NetworkInterfaces implementation and updates) Jan Roehrich
(BasicTreeUI and JTree fixes) Jeroen Frijters (ClassLoader and nio
cleanups, Serialization fixes, better Proxy support, bug fixes and
IKVM integration) Julian Scheid (Documentation updates and gjdoc
support) Ka-Hing Cheung (TreePath and TreeSelection fixes) Kalle Olavi
Niemitalo (Build fixes) Keith Seitz (Lots of JDWP work) Kelley Cook
(Build fixes) Kim Ho (JFileChooser implementation) Lillian Angel
(JTree implementation and lots Free Swing additions and bug fixes)
Mark Wielaard (Bug fixes, packaging and release management, Clipboard
implementation, System call interrupts and network timeouts and
GdkPixpufDecoder fixes) Martin Cordova (Suggestions for better
SocketTimeoutException) Michael Koch (Configuration fixes. Locale
updates, bug and build fixes) Nicolas Geoffray (VMClassLoader and
AccessController improvements) Olga Rodimina (MenuSelectionManager)
Paul Jenner (Better -Werror support) Rainer Orth (Build fixes) Robert
Schuster (Documentation updates and beans fixes, TreeNode enumerations
and ActionCommand and various fixes, XML and URL, AWT and Free Swing
bug fixes) Roman Kennke (BoxLayout, GrayFilter and SplitPane, plus
bugfixes all over. Lots of Free Swing work including styled text)
Santiago Gala (AccessControlContext fixes) Simon Kitching (String
cleanups and optimization suggestions) Stuart Ballard (RMI constant
fixes) Sven de Marothy (BMP imageio support, CSS and TextLayout
fixes. GtkImage rewrite, 2D, awt, free swing and date/time fixes, Qt4
peers) Thomas Fitzsimmons (Lot of upgrades to the gtk+ AWT and cairo
2D support. Lots of imageio framework additions, lots of AWT and Free
Swing bug fixes) Tom Tromey (Eclipse integration, generics work, lots
of bug fixes and gcj integration including coordinating The Big Merge)
Wolfgang Baer (GapContent bug fixes) Ziga Mahkovec (Graphics2D
upgraded to cairo 0.5 and new regex features)
*** Changes in GCC 4.0:
* Character encoders and decoders have been added for: iso-8859-6
(arabic), iso-8859-7 (greek), iso-8859-8 (hebrew), iso-8859-9
(latin-5), iso-8859-13, iso-8859-15 (latin-9), cp1047 (ebcdic),
ebcdic-xml-us,ascii, windows-1250, windows-1252, UTF-16BE (Big Endian),
UTF-16LE (Little Endian), UTF-32BE (Big Endian), UTF-32LE (Little
Endian).
* Lots of Calendar bug fixes.
* The http url protocol handler has been replaced with a full HTTP/1.1
version from GNU inetlib.
* A new ftp url protocol handler has been added also from GNU inetlib.
* java.beans has been updated to 1.4 including support for XMLEncoder
and XMLDecoder.
* Added implementations of javax.xml (JAXP 1.3), org.xml.sax (SAX2)
and org.w3c.dom (DOM Level 3) interfaces. It is possible to switch
between different implementations AElfred2, GNU DOM, GNU XSL, libxmlj
SAX, libxmlj DOM and libxmlj XSL by setting different system
properties. Also provided is a preliminary XPath 1.0
implementation. The libxmlj versions are build around libxml2 and
libxslt and have to be enabled during build time by the --enable-xmlj
configure flag. The current support is equal to the last released GNU
JAXP 1.3 release. These packages will be maintained as part of the GNU
Classpath core classes in the future. For more information,
conformance results and documentation on selecting different
implementations see doc/README.jaxp.
* Much fuller collection documentation.
* libgcj can now load service providers that are described via
META-INF/services/* resources in extension JARs. This is useful for
implementing the various APIs that are supposed to be extensible via
custom plugins. For details, please see the documentation of
gnu.classpath.ServiceFactory.
* GNU Classpath's JAR implementation now has preliminary support for
signed entries, for so called "signed JAR" file support. Signed JAR
files are one of the key security features of managed runtimes, and
allows code to run privileged given unforgeable proofs of identity.
* A much improved version of X.509 certificates has been added,
including a robust certificate path checking algorithm. Also included
is an implementation of the RSA signature scheme.
* New javax.crypto, javax.crypto.interfaces, javax.crypto.spec,
javax.net, javax.net.ssl, javax.security.auth,
javax.security.auth.callback, javax.security.auth.login,
javax.security.auth.x500, javax.security.sasl and org.ietf.jgss
packages are now officially part of GNU Classpath. Extra crypto
algorithms can be obtained from the GNU Crypto project, a full TLS
implementation is provided by the Jessie project.
http://www.gnu.org/software/gnu-crypto/
http://www.nongnu.org/jessie/
* java.security.AccessController has been implemented.
* The default java.lang.SecurityManager now uses AccessController.
* Lookahead support for regular expressions.
* java.util.regexp implementation through gnu.regexp wrappers.
* Serialization object stream fixes for multiple ClassLoader scenarios.
* java.net.URL now uses application classloader to load
URLStreamHandlers and reuses URLStreamHandlers when URL is reset (but
protocol isn't changed).
* java.io.File.deleteOnExit() implementation.
* java.io is now implemented by delegating most tasks directly to
java.nio.
* Reworked/Optimized implementations of java.nio.Buffer and subclasses.
* BufferedReader speed improvements.
* Multiple java.net.InetAdress fixes and java.rmi fixes.
* ServerSocket.accept() now restarts listening when system call
interrupted.
* java.net.URI implementation.
* New javax.print, javax.print.attribute[.standard] and
javax.print.event packages and classes.
* java.text multiple new features and bug fixes (only 2 out of the
1000+ java.text Mauve tests now fail).
* java.text attributed iterators support.
* Improved useabilty of java.text implementation for several
applications.
* More AWT accessible support.
* AWT gtk+ peers component layout, dialog placement, keyboard focus
handling and text positioning have been improved.
* ImageIO interfaces are more complete.
* JList, JTable and JTree have been hugely improved.
* java.awt.Robot support with GdkRobot in the gtk+ awt peers. Needs
XTest Extension (libXtst) XServer support.
* Full java.awt.color implementation, with all standard ICC profiles,
except for PhotoYCC color space.
* java.awt.image support updated to 1.4.
* Big-endian (PowerPC) fixes for native awt GTK+ peers.
* Better AWT focus management fro GTK+ peers.
* Much faster and better fonts support (for both gdk Graphics and cairo
Graphics2D)
* AWT Choice fixes for hidden components.
* More javax.imageio support.
* Better AWT Help MenuBar support.
* Swing TabbedPane, ColorChooser and ComboBox improvements.
* Start of JTree functionality.
* javax.swing.Spring and SpringLayout support.
* Added pluggable look and feel support for BasicTextFieldUI and
BasicToolBarSeparatorUI.
* java.swing.text support for (Default and Layered) Highlighter,
FieldView, PlainView, TabExpander and TabableView added.
* Start of JTable and JTree implementation.
* Internal Swing frames work.
* JMenu and JPopupMenu work.
* New gtk+ AWT FileDialog peer now based on gtk+2.4 or higher.
* java.awt.image LookupTables and kernel support.
* Improved java.awt.image.BufferedImage support.
* AWT 1.0 event model support.
* Frame.setIconImage() support.
* AWT GDKGraphics scaling.
* New configure flag --enable-gtk-cairo to build Graphics2D
implementation build on cairo and pangoft2. Enabled at runtime by
defining the system property gnu.java.awt.peer.gtk.Graphics=Graphics2D.
* javax.swing.JSpinner implemented.
* java.awt.geom completed. Area, Arc2D, Ellipse2D and Line2D
implemented.
* JColorChooser, JComboBox and JTextField implemented, including
example uses in GNU Classpath Examples swing Demo.
* Better (non-black) default AWT System colors.
* AWT lists use GTK treeviews.
* Proper AWT focus management has been implemented.
* Swing menus and scrollpanes are beginning to work.
* Swing splitpanes, dialogs and internal frames were added.
* Swing repainting / double buffering was redone.
* Font management and Pango DPI conversion fixes.
* A lot of AWT imaging and event bugs have been picked out.
* More of javax.swing.text has been implemented.
* javax.swing.Timer has been reimplemented.
* The gnu.java.awt.EmbeddedWindow class has been improved, and now
supports embedding AWT windows in other top-level X windows. This
functionality is required by gcjwebplugin.
* New javax.imageio, javax.imageio.event and javax.imageio.spi packages
and classes.
* Working implementation of javax.swing.undo.
* java.awt.geom.CubicCurve2D/QuadCurve2D: Can now solve cubic and
quadratic equations; implementation adapted from the GNU Scientific
Library.
* Lots of java.awt and gtk+ peer improvements. Also more Swing work.
Start of EmbeddedWindow support.
*** Changes in GCC 3.4:
* Compiling a .jar file will now cause non-.class entries to be automatically
compiled as resources.
* libgcj has been ported to Darwin.
* Jeff Sturm has adapted Jan Hubicka's call graph optimization code to gcj.
* libgcj has a new gcjlib URL type; this lets URLClassLoader load code from
shared libraries.
* libgcj has been much more completely merged with GNU Classpath.
* Class loading is now much more correct; in particular the caller's class
loader is now used when that is required.
* Eclipse 2.x will run out of the box using gij.
* Parts of java.nio have been implemented. Direct and indirect buffers work,
as do fundamental file and socket operations.
* java.awt has been improved, though it is still not ready for general use.
* The HTTP protocol handler now uses HTTP/1.1 and can handle the POST method.
* The MinGW port has matured. Enhancements include socket timeout support,
thread interruption, improved Runtime.exec() handling and support for
accented characters in filenames.
*** Changes in GCC 3.3:
* The java.sql and javax.sql packages now implement the JDBC 3.0 (JDK 1.4)
API.
* The JDK 1.4 assert facility has been implemented.
* The bytecode interpreter is now direct threaded and thus faster.
*** Changes in GCC 3.1:
* libgcj now includes RMI, java.lang.ref.*, javax.naming, and
javax.transaction.
* Property files and other system resources can be compiled into executables
which use libgcj using the new gcj --resource feature.
* libgcj has been ported to more platforms. In particular there is now a
mostly-functional mingw32 (Windows) target port.
* JNI and CNI invocation interfaces were implemented, so gcj-compiled Java
code can now be called from a C/C++ application.
* gcj can now use builtin functions for certain known methods, for instance
Math.cos.
* gcj can now automatically remove redundant array-store checks in some common
cases.
* The --no-store-checks optimization option was added. This can be used to
omit runtime store checks for code which is known not to throw
ArrayStoreException
* The following third party interface standards were added to libgcj:
org.w3c.dom and org.xml.sax.
* java.security has been merged with GNU Classpath. The new package is now
JDK 1.2 compliant, and much more complete.
* A bytecode verifier was added to the libgcj interpreter.
* java.lang.Character was rewritten to comply with the Unicode 3.0 standard,
and improve performance.
* Partial support for many more locales was added to libgcj.
* Socket timeouts have been implemented.
* libgcj has been merged into a single shared library. There are no longer
separate shared libraries for the garbage collector and zlib.
* Several performance improvements were made to gcj and libgcj:
o Hash synchronization (thin locks)
o A special allocation path for finalizer-free objects
o Thread-local allocation
o Parallel GC, and other GC tweaks
*** Changes in GCC 3.0:
* libgcj now includes a bytecode interpreter. If a compiled version of a class
is not found in the application binary or linked shared libraries, the
class loader will search for a bytecode version in the CLASSPATH and execute
it using the interpreter. A new front end that behaves like the traditional
`java' command is also provided: `gij'.
* Support for specifying java system properties. Properties can either be set
at runtime via the GCJ_PROPERTIES environment variable in the format
"<name>=<value> ..."'; or can be compiled into an application binary using
-D<name>=<value>.
* Support for setjmp/longjmp (sjlj) exception handling has been added, as an
alternative to the existing range-table based mechanism. sjlj is the default
on non-sparc, non-x86 targets, or can be specified with the
`--enable-sjlj-exceptions' configure parameter.
* Complete JDK 1.1 reflection support, including invocation.
* Throwable.printStackTrace() has been implemented.
* Runtime.loadLibrary() has been implemented.
* Class.forName() will now try to load a series of shared objects in order
to find the requested class. If a class `gnu.quux.whatever' is requested,
libgcj will search the system shared library path (eg LD_LIBRARY_PATH) for
`gnu-quux-whatever.so', then `gnu-quux.so', and finally `gnu.so'.
* A pure-java implementation of java.math.BigInteger.
New in libgcj 2.95:
* First public release

View File

@ -1,22 +0,0 @@
This is libgcj: the runtime library for gcj, the GNU Compiler for Java.
libgcj provides a partial implementation of the Java Class Libraries.
libgcj is free software. See the file LIBGCJ_LICENSE for copying permission.
DOCUMENTATION
=============
All documentation, including detailed installation and usage instructions,
can be found on the gcj web pages at this URL:
http://gcc.gnu.org/java/
BUGS
====
Please refer to
http://gcc.gnu.org/bugs/
on when and how to submit a bug report.

View File

@ -1,273 +0,0 @@
Many people contribute to the GCJ project, and in many different
capacities. Any omissions to this list are accidental. Please keep
this list in alphabetical order.
Robert Abeles
Mark G. Adams
C. Scott Ananian
Mark Anderson
Bonzo Armstrong
Steven Augart
Godmar Back
Stuart Ballard
Scott Bambrough
David Belanger
Jon Beniston
Gary Benson
Mark Benvenuto
Daniel Berlin
Geoff Berry
Alberto Biancardi
Artur Biesiadowski
David Billinghurst
Eric Blake
Hans Boehm
Paolo Bonzini
Neil Booth
Steven Bosscher
Per Bothner
Sascha Brawer
Dave Brolley
Rodney Brown
Joerg Brunsmann
Nathan Bryant
Adrian Bunk
Andrew Cagney
John F. Carr
Steve Chamberlain
Glenn Chambers
John-Marc Chandonia
Michael Chastain
Tang Ching-Hui
Eric Christopher
Randolph Chung
James Clark
Nick Clifton
Kelley Cook
Christian Cornelssen
Stephen Crawley
David Daney
Marcus G. Daniels
Mo DeJong
Bert Deknuydt
DJ Delorie
Akim Demaille
R. A. Rivas Diaz
Julian Dolby
Richard Earnshaw
David Edelsohn
Frank Ch. Eigler
Mohan Embar
Marc Espie
Nic Ferrier
Thomas Fitzsimmons
Andreas Franck
Norbert Frese
Todd T. Fries
Jeroen Frijters
Wu Gansha
Ivan Fontes Garcia
Kaveh R. Ghazi
Scott Gilbertson
John Gilmore
Jacob Gladish
Taras Glek
Anthony Green
Stu Grossman
David P Grove
Laurent Guerby
Andrew Haley
Raja R Harinath
Richard Henderson
Kevin B Hendricks
Kazu Hirata
Kim Ho
Graydon Hoare
Jochen Hoenicke
Jens-Michael Hoffmann
Manfred Hollstein
Jan Hubicka
Bernardo Innocenti
Christian Iseli
Andreas Jaeger
David Jee
Jakub Jelinek
Mojo Jojo
C. Brian Jones
Tim Josling
Martin Kahlert
Ito Kazumitsu
Geoffrey Keating
Brendan Kehoe
Richard Kenner
Mumit Khan
Dhek Bhun Kho
Tony Kimball
Adam King
Matthias Klose
Michael Koch
Kaz Kojima
Stepan Koltsov
Bruce Korb
Matt Kraai
Guilhem Lavaux
Jeffrey A Law
John Leuner
Warren Levy
Oskar Liljeblad
Robert Lipe
Ralph Loader
H.J. Lu
Brad Lucier
Martin v. Löwis
Andrew MacLeod
Jan van Male
Jerome Marc
Casey Marshall
T.J. Mather
Ranjit Mathew
Greg McGary
Bryce McKinlay
Adam Megacz
Marcus Meissner
Jason Merrill
Jim Meyering
David S. Miller
Corey Minyard
Mark Mitchell
Alan Modra
Jason Molenda
Peter Moon
Mike Moreton
Joseph S. Myers
Raif Naffah
Raif S. Naffah
Fernando Nasser
Nathanael Nerode
Pekka Nikander
Hans-Peter Nilsson
Jeremy Nimmer
Diego Novillo
Jeffrey Oldham
Alexandre Oliva
Rainer Orth
Andrew Overholt
Theodore Papadopoulo
Oscar Pearce
Alexandre Petit-Bianco
Andrew Pinski
Ovidiu Predescu
Steve Pribyl
Ingo Proetel
Vladimir Puskas
Jerry Quinn
Rolf W. Rasmussen
Volker Reichelt
Petter Reinholdtsen
Gabriel Dos Reis
Aaron M. Renn
J"orn Rennecke
Loren J. Rittle
Mark J. Roberts
Olga Rodimina
Craig Rodrigues
Jesse Rosenstock
Torsten Rueger
Douglas B. Rupp
Roger Sayle
Bradley Schatz
Bernd Schmidt
Jason Schroeder
Andreas Schwab
Chris Sears
Nathan Sidwell
Franz Sirl
Danny Smith
Michael Smith
Todd Stock
Graham Stott
John Stracke
Mike Stump
Jeff Sturm
Sam TH
Philipp Thomas
Jason Thorpe
Bo Thorsen
Kresten Krab Thorup
Michael Tiemann
Andreas Tobler
Gerhard Tonn
Dalibor Topic
Gregg Townsend
Tom Tromey
Arnaud Vandyck
H. Väisänen
Krister Walfridsson
Ulrich Weigand
Zack Weinberg
Matt Welsh
Urban Widmark
Mark Wielaard
Gilles Zunino
We'd also like to thank these folks who contributed time and energy
in testing early versions of GCJ:
Michael Abd-El-Malek
Thomas Arend
Bonzo Armstrong
Steven Ashe
Chris Baldwin
David Billinghurst
Jim Blandy
Stephane Bortzmeyer
Frank Braun
Sidney Cadot
Bradford Castalia
Ralph Doncaster
Richard Emberson
Graham Fawcett
Robert A. French
Mark K. Gardner
Charles-Antoine Gauthier
Simon Gornall
Fred Gray
John Griffin
Patrik Hagglund
Phil Hargett
Amancio Hasty
Bryan W. Headley
Kevin B. Hendricks
Joep Jansen
David Kidd
Tobias Kuipers
Anand Krishnaswamy
H.J. Lu
Jesse Macnish
Anon A. Mous
Stefan Morrell
Pekka Nikander
Jon Olson
Magnus Persson
Chris Pollard
Paul Reilly
Tom Reilly
Torsten Rueger
Danny Sadinoff
Marc Schifer
Franz Sirl
Tim Souder
Adam Sulmicki
Frederik Warg
Gregory Warnes
David E. Young
Special thanks to:
The GCC project contributors for all of their great compiler work.
The GNU Classpath project for all of their merged class libraries.
All of the Mauve project contributors, for test code.
All the contributors to the Jacks compiler test suite.
Thank you all!

1075
libjava/aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,763 +0,0 @@
// boehm.cc - interface between libjava and Boehm GC.
/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation
This file is part of libgcj.
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
#include <config.h>
#include <stdio.h>
#include <limits.h>
#include <jvm.h>
#include <gcj/cni.h>
#include <java/lang/Class.h>
#include <java/lang/reflect/Modifier.h>
#include <java-interp.h>
// More nastiness: the GC wants to define TRUE and FALSE. We don't
// need the Java definitions (themselves a hack), so we undefine them.
#undef TRUE
#undef FALSE
// We include two autoconf headers. Avoid multiple definition warnings.
#undef PACKAGE_NAME
#undef PACKAGE_STRING
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION
#ifdef HAVE_DLFCN_H
#undef _GNU_SOURCE
#define _GNU_SOURCE
#include <dlfcn.h>
#endif
extern "C"
{
#include <gc_config.h>
// Set GC_DEBUG before including gc.h!
#ifdef LIBGCJ_GC_DEBUG
# define GC_DEBUG
#endif
#include <gc_mark.h>
#include <gc_gcj.h>
#include <javaxfc.h> // GC_finalize_all declaration.
#ifdef THREAD_LOCAL_ALLOC
# define GC_REDIRECT_TO_LOCAL
# include <gc_local_alloc.h>
#endif
// From boehm's misc.c
void GC_enable();
void GC_disable();
};
#define MAYBE_MARK(Obj, Top, Limit, Source) \
Top=GC_MARK_AND_PUSH((GC_PTR) Obj, Top, Limit, (GC_PTR *) Source)
// `kind' index used when allocating Java arrays.
static int array_kind_x;
// Freelist used for Java arrays.
static void **array_free_list;
static int _Jv_GC_has_static_roots (const char *filename, void *, size_t);
// This is called by the GC during the mark phase. It marks a Java
// object. We use `void *' arguments and return, and not what the
// Boehm GC wants, to avoid pollution in our headers.
void *
_Jv_MarkObj (void *addr, void *msp, void *msl, void *env)
{
struct GC_ms_entry *mark_stack_ptr = (struct GC_ms_entry *)msp;
struct GC_ms_entry *mark_stack_limit = (struct GC_ms_entry *)msl;
if (env == (void *)1) /* Object allocated with debug allocator. */
addr = (GC_PTR)GC_USR_PTR_FROM_BASE(addr);
jobject obj = (jobject) addr;
_Jv_VTable *dt = *(_Jv_VTable **) addr;
// The object might not yet have its vtable set, or it might
// really be an object on the freelist. In either case, the vtable slot
// will either be 0, or it will point to a cleared object.
// This assumes Java objects have size at least 3 words,
// including the header. But this should remain true, since this
// should only be used with debugging allocation or with large objects.
if (__builtin_expect (! dt || !(dt -> get_finalizer()), false))
return mark_stack_ptr;
jclass klass = dt->clas;
GC_PTR p;
p = (GC_PTR) dt;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, obj);
# ifndef JV_HASH_SYNCHRONIZATION
// Every object has a sync_info pointer.
p = (GC_PTR) obj->sync_info;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, obj);
# endif
if (__builtin_expect (klass == &java::lang::Class::class$, false))
{
// Currently we allocate some of the memory referenced from class objects
// as pointerfree memory, and then mark it more intelligently here.
// We ensure that the ClassClass mark descriptor forces invocation of
// this procedure.
// Correctness of this is subtle, but it looks OK to me for now. For the incremental
// collector, we need to make sure that the class object is written whenever
// any of the subobjects are altered and may need rescanning. This may be tricky
// during construction, and this may not be the right way to do this with
// incremental collection.
// If we overflow the mark stack, we will rescan the class object, so we should
// be OK. The same applies if we redo the mark phase because win32 unmapped part
// of our root set. - HB
jclass c = (jclass) addr;
p = (GC_PTR) c->name;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
p = (GC_PTR) c->superclass;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
p = (GC_PTR) c->constants.tags;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
p = (GC_PTR) c->constants.data;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
// If the class is an array, then the methods field holds a
// pointer to the element class. If the class is primitive,
// then the methods field holds a pointer to the array class.
p = (GC_PTR) c->methods;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
p = (GC_PTR) c->fields;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
// The vtable might be allocated even for compiled code.
p = (GC_PTR) c->vtable;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
p = (GC_PTR) c->interfaces;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
p = (GC_PTR) c->loader;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
// The dispatch tables can be allocated at runtime.
p = (GC_PTR) c->ancestors;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
p = (GC_PTR) c->idt;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
p = (GC_PTR) c->arrayclass;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
p = (GC_PTR) c->protectionDomain;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
p = (GC_PTR) c->hack_signers;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
p = (GC_PTR) c->aux_info;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
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;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
}
else
{
// NOTE: each class only holds information about the class
// itself. So we must do the marking for the entire inheritance
// tree in order to mark all fields. FIXME: what about
// interfaces? We skip Object here, because Object only has a
// sync_info, and we handled that earlier.
// Note: occasionally `klass' can be null. For instance, this
// can happen if a GC occurs between the point where an object
// is allocated and where the vtbl slot is set.
while (klass && klass != &java::lang::Object::class$)
{
jfieldID field = JvGetFirstInstanceField (klass);
jint max = JvNumInstanceFields (klass);
for (int i = 0; i < max; ++i)
{
if (JvFieldIsRef (field))
{
jobject val = JvGetObjectField (obj, field);
p = (GC_PTR) val;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, obj);
}
field = field->getNextField ();
}
klass = klass->getSuperclass();
}
}
return mark_stack_ptr;
}
// This is called by the GC during the mark phase. It marks a Java
// array (of objects). We use `void *' arguments and return, and not
// what the Boehm GC wants, to avoid pollution in our headers.
void *
_Jv_MarkArray (void *addr, void *msp, void *msl, void *env)
{
struct GC_ms_entry *mark_stack_ptr = (struct GC_ms_entry *)msp;
struct GC_ms_entry *mark_stack_limit = (struct GC_ms_entry *)msl;
if (env == (void *)1) /* Object allocated with debug allocator. */
addr = (void *)GC_USR_PTR_FROM_BASE(addr);
jobjectArray array = (jobjectArray) addr;
_Jv_VTable *dt = *(_Jv_VTable **) addr;
// Assumes size >= 3 words. That's currently true since arrays have
// a vtable, sync pointer, and size. If the sync pointer goes away,
// we may need to round up the size.
if (__builtin_expect (! dt || !(dt -> get_finalizer()), false))
return mark_stack_ptr;
GC_PTR p;
p = (GC_PTR) dt;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, array);
# ifndef JV_HASH_SYNCHRONIZATION
// Every object has a sync_info pointer.
p = (GC_PTR) array->sync_info;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, array);
# endif
for (int i = 0; i < JvGetArrayLength (array); ++i)
{
jobject obj = elements (array)[i];
p = (GC_PTR) obj;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, array);
}
return mark_stack_ptr;
}
// Generate a GC marking descriptor for a class.
//
// We assume that the gcj mark proc has index 0. This is a dubious assumption,
// since another one could be registered first. But the compiler also
// knows this, so in that case everything else will break, too.
#define GCJ_DEFAULT_DESCR GC_MAKE_PROC(GC_GCJ_RESERVED_MARK_PROC_INDEX,0)
void *
_Jv_BuildGCDescr(jclass self)
{
jlong desc = 0;
jint bits_per_word = CHAR_BIT * sizeof (void *);
// Note: for now we only consider a bitmap mark descriptor. We
// could also handle the case where the first N fields of a type are
// references. However, this is not very likely to be used by many
// classes, and it is easier to compute things this way.
// The vtable pointer.
desc |= 1ULL << (bits_per_word - 1);
#ifndef JV_HASH_SYNCHRONIZATION
// The sync_info field.
desc |= 1ULL << (bits_per_word - 2);
#endif
for (jclass klass = self; klass != NULL; klass = klass->getSuperclass())
{
jfieldID field = JvGetFirstInstanceField(klass);
int count = JvNumInstanceFields(klass);
for (int i = 0; i < count; ++i)
{
if (field->isRef())
{
unsigned int off = field->getOffset();
// If we run into a weird situation, we bail.
if (off % sizeof (void *) != 0)
return (void *) (GCJ_DEFAULT_DESCR);
off /= sizeof (void *);
// If we find a field outside the range of our bitmap,
// fall back to procedure marker. The bottom 2 bits are
// reserved.
if (off >= (unsigned) bits_per_word - 2)
return (void *) (GCJ_DEFAULT_DESCR);
desc |= 1ULL << (bits_per_word - off - 1);
}
field = field->getNextField();
}
}
// For bitmap mark type, bottom bits are 01.
desc |= 1;
// Bogus warning avoidance (on many platforms).
return (void *) (unsigned long) desc;
}
// Allocate some space that is known to be pointer-free.
void *
_Jv_AllocBytes (jsize size)
{
void *r = GC_MALLOC_ATOMIC (size);
// We have to explicitly zero memory here, as the GC doesn't
// guarantee that PTRFREE allocations are zeroed. Note that we
// don't have to do this for other allocation types because we set
// the `ok_init' flag in the type descriptor.
memset (r, 0, size);
return r;
}
#ifdef LIBGCJ_GC_DEBUG
void *
_Jv_AllocObj (jsize size, jclass klass)
{
return GC_GCJ_MALLOC (size, klass->vtable);
}
void *
_Jv_AllocPtrFreeObj (jsize size, jclass klass)
{
#ifdef JV_HASH_SYNCHRONIZATION
void * obj = GC_MALLOC_ATOMIC(size);
*((_Jv_VTable **) obj) = klass->vtable;
#else
void * obj = GC_GCJ_MALLOC(size, klass->vtable);
#endif
return obj;
}
#endif /* LIBGCJ_GC_DEBUG */
// In the non-debug case, the above two functions are defined
// as inline functions in boehm-gc.h. In the debug case we
// really want to take advantage of the definitions in gc_gcj.h.
// Allocate space for a new Java array.
// Used only for arrays of objects.
void *
_Jv_AllocArray (jsize size, jclass klass)
{
void *obj;
#ifdef LIBGCJ_GC_DEBUG
// There isn't much to lose by scanning this conservatively.
// If we didn't, the mark proc would have to understand that
// it needed to skip the header.
obj = GC_MALLOC(size);
#else
const jsize min_heap_addr = 16*1024;
// A heuristic. If size is less than this value, the size
// stored in the array can't possibly be misinterpreted as
// a pointer. Thus we lose nothing by scanning the object
// completely conservatively, since no misidentification can
// take place.
if (size < min_heap_addr)
obj = GC_MALLOC(size);
else
obj = GC_generic_malloc (size, array_kind_x);
#endif
*((_Jv_VTable **) obj) = klass->vtable;
return obj;
}
/* Allocate space for a new non-Java object, which does not have the usual
Java object header but may contain pointers to other GC'ed objects. */
void *
_Jv_AllocRawObj (jsize size)
{
return (void *) GC_MALLOC (size ? size : 1);
}
#ifdef INTERPRETER
typedef _Jv_ClosureList *closure_list_pointer;
/* Release closures in a _Jv_ClosureList. */
static void
finalize_closure_list (GC_PTR obj, GC_PTR)
{
_Jv_ClosureList **clpp = (_Jv_ClosureList **)obj;
_Jv_ClosureList::releaseClosures (clpp);
}
/* Allocate a double-indirect pointer to a _Jv_ClosureList that will
get garbage-collected after this double-indirect pointer becomes
unreachable by any other objects, including finalizable ones. */
_Jv_ClosureList **
_Jv_ClosureListFinalizer ()
{
_Jv_ClosureList **clpp;
clpp = (_Jv_ClosureList **)_Jv_AllocBytes (sizeof (*clpp));
GC_REGISTER_FINALIZER_UNREACHABLE (clpp, finalize_closure_list,
NULL, NULL, NULL);
return clpp;
}
#endif // INTERPRETER
static void
call_finalizer (GC_PTR obj, GC_PTR client_data)
{
_Jv_FinalizerFunc *fn = (_Jv_FinalizerFunc *) client_data;
jobject jobj = (jobject) obj;
(*fn) (jobj);
}
void
_Jv_RegisterFinalizer (void *object, _Jv_FinalizerFunc *meth)
{
GC_REGISTER_FINALIZER_NO_ORDER (object, call_finalizer, (GC_PTR) meth,
NULL, NULL);
}
void
_Jv_RunFinalizers (void)
{
GC_invoke_finalizers ();
}
void
_Jv_RunAllFinalizers (void)
{
GC_finalize_all ();
}
void
_Jv_RunGC (void)
{
GC_gcollect ();
}
long
_Jv_GCTotalMemory (void)
{
return GC_get_heap_size ();
}
long
_Jv_GCFreeMemory (void)
{
return GC_get_free_bytes ();
}
void
_Jv_GCSetInitialHeapSize (size_t size)
{
size_t current = GC_get_heap_size ();
if (size > current)
GC_expand_hp (size - current);
}
void
_Jv_GCSetMaximumHeapSize (size_t size)
{
GC_set_max_heap_size ((GC_word) size);
}
int
_Jv_SetGCFreeSpaceDivisor (int div)
{
return (int)GC_set_free_space_divisor ((GC_word)div);
}
void
_Jv_DisableGC (void)
{
GC_disable();
}
void
_Jv_EnableGC (void)
{
GC_enable();
}
static void * handle_out_of_memory(size_t)
{
_Jv_ThrowNoMemory();
}
static void
gcj_describe_type_fn(void *obj, char *out_buf)
{
_Jv_VTable *dt = *(_Jv_VTable **) obj;
if (! dt /* Shouldn't happen */)
{
strcpy(out_buf, "GCJ (bad)");
return;
}
jclass klass = dt->clas;
if (!klass /* shouldn't happen */)
{
strcpy(out_buf, "GCJ (bad)");
return;
}
jstring name = klass -> getName();
size_t len = name -> length();
if (len >= GC_TYPE_DESCR_LEN) len = GC_TYPE_DESCR_LEN - 1;
JvGetStringUTFRegion (name, 0, len, out_buf);
out_buf[len] = '\0';
}
void
_Jv_InitGC (void)
{
int proc;
static bool gc_initialized;
if (gc_initialized)
return;
gc_initialized = 1;
// Ignore pointers that do not point to the start of an object.
GC_all_interior_pointers = 0;
#if defined (HAVE_DLFCN_H) && defined (HAVE_DLADDR)
// Tell the collector to ask us before scanning DSOs.
GC_register_has_static_roots_callback (_Jv_GC_has_static_roots);
#endif
// Configure the collector to use the bitmap marking descriptors that we
// stash in the class vtable.
// We always use mark proc descriptor 0, since the compiler knows
// about it.
GC_init_gcj_malloc (0, (void *) _Jv_MarkObj);
// Cause an out of memory error to be thrown from the allocators,
// instead of returning 0. This is cheaper than checking on allocation.
GC_oom_fn = handle_out_of_memory;
GC_java_finalization = 1;
// We use a different mark procedure for object arrays. This code
// configures a different object `kind' for object array allocation and
// marking.
array_free_list = GC_new_free_list();
proc = GC_new_proc((GC_mark_proc)_Jv_MarkArray);
array_kind_x = GC_new_kind(array_free_list, GC_MAKE_PROC (proc, 0), 0, 1);
// Arrange to have the GC print Java class names in backtraces, etc.
GC_register_describe_type_fn(GC_gcj_kind, gcj_describe_type_fn);
GC_register_describe_type_fn(GC_gcj_debug_kind, gcj_describe_type_fn);
}
#ifdef JV_HASH_SYNCHRONIZATION
// Allocate an object with a fake vtable pointer, which causes only
// the first field (beyond the fake vtable pointer) to be traced.
// Eventually this should probably be generalized.
static _Jv_VTable trace_one_vtable = {
0, // class pointer
(void *)(2 * sizeof(void *)),
// descriptor; scan 2 words incl. vtable ptr.
// Least significant bits must be zero to
// identify this as a length descriptor
{0} // First method
};
void *
_Jv_AllocTraceOne (jsize size /* includes vtable slot */)
{
return GC_GCJ_MALLOC (size, &trace_one_vtable);
}
// Ditto for two words.
// the first field (beyond the fake vtable pointer) to be traced.
// Eventually this should probably be generalized.
static _Jv_VTable trace_two_vtable =
{
0, // class pointer
(void *)(3 * sizeof(void *)),
// descriptor; scan 3 words incl. vtable ptr.
{0} // First method
};
void *
_Jv_AllocTraceTwo (jsize size /* includes vtable slot */)
{
return GC_GCJ_MALLOC (size, &trace_two_vtable);
}
#endif /* JV_HASH_SYNCHRONIZATION */
void
_Jv_GCInitializeFinalizers (void (*notifier) (void))
{
GC_finalize_on_demand = 1;
GC_finalizer_notifier = notifier;
}
void
_Jv_GCRegisterDisappearingLink (jobject *objp)
{
// This test helps to ensure that we meet a precondition of
// GC_general_register_disappearing_link, viz. "Obj must be a
// pointer to the first word of an object we allocated."
if (GC_base(*objp))
GC_general_register_disappearing_link ((GC_PTR *) objp, (GC_PTR) *objp);
}
jboolean
_Jv_GCCanReclaimSoftReference (jobject)
{
// For now, always reclaim soft references. FIXME.
return true;
}
#if defined (HAVE_DLFCN_H) && defined (HAVE_DLADDR)
// We keep a store of the filenames of DSOs that need to be
// conservatively scanned by the garbage collector. During collection
// the gc calls _Jv_GC_has_static_roots() to see if the data segment
// of a DSO should be scanned.
typedef struct filename_node
{
char *name;
struct filename_node *link;
} filename_node;
#define FILENAME_STORE_SIZE 17
static filename_node *filename_store[FILENAME_STORE_SIZE];
// Find a filename in filename_store.
static filename_node **
find_file (const char *filename)
{
int index = strlen (filename) % FILENAME_STORE_SIZE;
filename_node **node = &filename_store[index];
while (*node)
{
if (strcmp ((*node)->name, filename) == 0)
return node;
node = &(*node)->link;
}
return node;
}
// Print the store of filenames of DSOs that need collection.
void
_Jv_print_gc_store (void)
{
for (int i = 0; i < FILENAME_STORE_SIZE; i++)
{
filename_node *node = filename_store[i];
while (node)
{
fprintf (stderr, "%s\n", node->name);
node = node->link;
}
}
}
// Create a new node in the store of libraries to collect.
static filename_node *
new_node (const char *filename)
{
filename_node *node = (filename_node*)_Jv_Malloc (sizeof (filename_node));
node->name = (char *)_Jv_Malloc (strlen (filename) + 1);
node->link = NULL;
strcpy (node->name, filename);
return node;
}
// Nonzero if the gc should scan this lib.
static int
_Jv_GC_has_static_roots (const char *filename, void *, size_t)
{
if (filename == NULL || strlen (filename) == 0)
// No filename; better safe than sorry.
return 1;
filename_node **node = find_file (filename);
if (*node)
return 1;
return 0;
}
#endif
// Register the DSO that contains p for collection.
void
_Jv_RegisterLibForGc (const void *p __attribute__ ((__unused__)))
{
#if defined (HAVE_DLFCN_H) && defined (HAVE_DLADDR)
Dl_info info;
if (dladdr (const_cast<void *>(p), &info) != 0)
{
filename_node **node = find_file (info.dli_fname);
if (! *node)
*node = new_node (info.dli_fname);
}
#endif
}
void
_Jv_SuspendThread (_Jv_Thread_t *thread)
{
#if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
&& !defined(GC_WIN32_THREADS) && !defined(GC_DARWIN_THREADS)
GC_suspend_thread (_Jv_GetPlatformThreadID (thread));
#endif
}
void
_Jv_ResumeThread (_Jv_Thread_t *thread)
{
#if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
&& !defined(GC_WIN32_THREADS) && !defined(GC_DARWIN_THREADS)
GC_resume_thread (_Jv_GetPlatformThreadID (thread));
#endif
}
int
_Jv_IsThreadSuspended (_Jv_Thread_t *thread)
{
#if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
&& !defined(GC_WIN32_THREADS) && !defined(GC_DARWIN_THREADS)
return GC_is_thread_suspended (_Jv_GetPlatformThreadID (thread));
#else
return 0;
#endif
}
void
_Jv_GCAttachThread ()
{
// The registration interface is only defined on posixy systems and
// only actually works if pthread_getattr_np is defined.
// FIXME: until gc7 it is simpler to disable this on solaris.
#if defined(HAVE_PTHREAD_GETATTR_NP) && !defined(GC_SOLARIS_THREADS) \
&& !defined(GC_WIN32_THREADS)
GC_register_my_thread ();
#endif
}
void
_Jv_GCDetachThread ()
{
#if defined(HAVE_PTHREAD_GETATTR_NP) && !defined(GC_SOLARIS_THREADS) \
&& !defined(GC_WIN32_THREADS)
GC_unregister_my_thread ();
#endif
}

View File

@ -1,3 +0,0 @@
<?xml version='1.0'?>
<?eclipse-cdt version="2.0"?>
<cdtproject/>

View File

@ -1,14 +0,0 @@
<?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>

View File

@ -1,18 +0,0 @@
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

File diff suppressed because one or more lines are too long

View File

@ -1,2 +0,0 @@
<?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:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; name=&quot;workingSet&quot; editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/classpath/include/Makefile&quot; type=&quot;1&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;}'/><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>

View File

@ -1,11 +0,0 @@
<?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:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot; factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; label=&quot;workingSet&quot; name=&quot;workingSet&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/classpath/install/share/classpath&quot; type=&quot;2&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
<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>

View File

@ -1,2 +0,0 @@
<?xml version='1.0'?>
<launchConfiguration type='org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType'><stringAttribute key='org.eclipse.debug.core.ATTR_REFRESH_SCOPE' value='${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; name=&quot;working set&quot; editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/classpath/native&quot; type=&quot;2&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;}'/><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:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; name=&quot;workingSet&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/classpath/native&quot; type=&quot;2&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;}'/><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>

View File

@ -1,13 +0,0 @@
<?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:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot; factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; name=&quot;workingSet&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/classpath/Makefile.in&quot; type=&quot;1&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
<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>

View File

@ -1,12 +0,0 @@
<?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:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; name=&quot;workingSet&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/classpath/resource/gnu/java/locale&quot; type=&quot;2&quot;/&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/classpath/scripts/generate-locale-list.sh&quot; type=&quot;1&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
<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:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot; factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; name=&quot;working set&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/classpath/gnu/java/locale&quot; type=&quot;2&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
<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>

View File

@ -1,77 +0,0 @@
<?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>&lt;project&gt;/.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>&lt;project&gt;/.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>&lt;project&gt;/.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>&lt;project&gt;/.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>&lt;project&gt;/.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>&lt;project&gt;/.externalToolBuilders/ClasspathJar.launch</value>
</dictionary>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -1,243 +0,0 @@
#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

View File

@ -1,12 +0,0 @@
#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

View File

@ -1,54 +0,0 @@
The following have made major contributions to the Classpath
project. See also the THANKYOU file, which lists people who have
caught bugs or submitted minor patches. If your name does not appear
on either list, but should, let us know. Please keep this list in
alphabetic order.
Lillian Angel (langel@redhat.com)
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)
Sascha Brawer (brawer@acm.org)
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)
Laszlo Andras Hernadi (e0327023@student.tuwien.ac.at)
Jochen Hoenicke (Jochen.Hoenicke@Informatik.Uni-Oldenburg.de)
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)
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)
Casey Marshall (csm@gnu.org)
Bryce McKinlay (bryce@waitaki.otago.ac.nz)
Audrius Meskauskas (audriusa@Bioinformatics.org)
Raif S. Naffah (raif@swiftdsl.com.au)
Aaron M. Renn (arenn@urbanophile.com)
Ian Rogers (ian.rogers@manchester.ac.uk)
Andrew Selkirk (aselkirk@sympatico.ca)
Robert Schuster (robertschuster@fsfe.org)
Joshua Sumali (jsumali@redhat.com)
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)
Jon A. Zeppieri (jon@eease.com)

View File

@ -1,5 +0,0 @@
This package is still in the early development phase. That means too
early to start listing bugs in a file like this one!
Report bugs to classpath@gnu.org or much better via Savannah at this
URL: http://www.gnu.org/software/classpath/bugs.html

View File

@ -1,340 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
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 of the License, 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
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

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

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

File diff suppressed because it is too large Load Diff

View File

@ -1,904 +0,0 @@
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
2014-01-02 Tobias Burnus <burnus@net-b.de>
* gnu/java/rmi/registry/RegistryImpl.java (version): Update
copyright notice dates.
* tools/gnu/classpath/tools/orbd/Main.java (run): Ditto.
2013-11-29 Matthias Klose <doko@ubuntu.com>
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_FreetypeGlyphVector.c,
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c:
Fix freetype includes.
2013-04-16 Andreas Schwab <schwab@suse.de>
* native/fdlibm/ieeefp.h: Add support for aarch64.
2013-02-21 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/56258
* doc/cp-tools.texinfo (Virtual Machine Options): Use just
one @gccoptlist instead of 3 separate ones.
2013-01-03 Jakub Jelinek <jakub@redhat.com>
* gnu/java/rmi/registry/RegistryImpl.java (version): Update
copyright notice dates.
* tools/gnu/classpath/tools/orbd/Main.java (run): Likewise.
2012-12-03 Matthias Klose <doko@ubuntu.com>
* configure.ac (AM_INIT_AUTOMAKE): Call with no-dist.
* m4/lib-ld.m4, m4/lib-link.m4,m4/lib-prefix.m4: New.
2012-05-16 H.J. Lu <hongjiu.lu@intel.com>
* configure: Regenerated.
2012-01-01 Jakub Jelinek <jakub@redhat.com>
* gnu/java/rmi/registry/RegistryImpl.java (version): Update
copyright notice dates.
* tools/gnu/classpath/tools/orbd/Main.java (run): Likewise.
2011-11-29 Andreas Tobler <andreast@fgznet.ch>
* config.rpath (ld_shlibs): Fix detection of FreeBSD-10 and up.
(libname_spec): Likewise.
* configure: Regenerate with autoconf -I ../../.
2011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* config.rpath, ltcf-c.sh, ltcf-gcj.sh, ltconfig: Remove
handling of freebsd1* which soon would match FreeBSD 10.0.
* configure: Regenerate.
2011-01-31 Alexandre Oliva <aoliva@redhat.com>
* configure.ac (GCJ_JAVAC): Run false rather than no.
* configure: Rebuilt.
2011-01-03 Jakub Jelinek <jakub@redhat.com>
* gnu/java/rmi/registry/RegistryImpl.java (version): Update
copyright notice dates.
* tools/gnu/classpath/tools/orbd/Main.java (run): Likewise.
2010-06-21 Jan Kratochvil <jan.kratochvil@redhat.com>
* doc/Makefile.am (POD2MAN): Provide --date from ChangeLog.
* doc/Makefile.in: Regenerate.
2010-04-07 Jakub Jelinek <jakub@redhat.com>
* native/jni/midi-alsa/gnu_javax_sound_midi_alsa_AlsaPortDevice.c
(Java_gnu_javax_sound_midi_alsa_AlsaPortDevice_run_1receiver_1thread_1):
Avoid set but not used warning.
2010-01-09 Jakub Jelinek <jakub@redhat.com>
* gnu/java/rmi/registry/RegistryImpl.java (version): Update
copyright notice dates.
* tools/gnu/classpath/tools/orbd/Main.java (run): Likewise.
2009-07-01 Jakub Jelinek <jakub@redhat.com>
* gnu/javax/swing/text/html/parser/HTML_401F.java (defineElements):
Split this huge method into...
(defineElements1, defineElements2, defineElements3, defineElements4,
defineElements5, defineElements6): ... these smaller methods.
2009-06-16 Matthias Klose <doko@ubuntu.com>
* tools/gnu/classpath/tools/gjdoc/Main.java (getGjdocVersion): Use
gnu.classpath.Configuration.CLASSPATH_VERSION as version number.
* tools/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.java
(getDocletVersion): Likewise.
* tools/classes/gnu/classpath/tools/gjdoc/Main*.class: Regenerate.
* tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet*.class:
Regenerate.
2009-03-16 Matthias Klose <doko@ubuntu.com>
* configure.ac: Detect xulrunner-1.9.
* configure: Regenerate.
2009-02-03 Jakub Jelinek <jakub@redhat.com>
* gnu/java/rmi/registry/RegistryImpl.java (version): Update
copyright notice dates.
* tools/gnu/classpath/tools/orbd/Main.java (run): Likewise.
2008-12-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
2008-11-12 Jakub Jelinek <jakub@redhat.com>
PR libgcj/33764
* configure.ac (INSTALL_BINARIES): New AM_CONDITIONAL.
* tools/Makefile.am: If not INSTALL_BINARIES, use noinst_PROGRAMS
instead of bin_PROGRAMS for binaries.
* configure: Regenerated.
* tools/Makefile.in: Regenerated.
2008-11-10 Andrew Haley <aph@redhat.com>
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c
(Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoDrawGlyphVector):
Remove bogus gdk_threads_leave ();
2008-10-23 Jakub Jelinek <jakub@redhat.com>
PR java/37893
* tools/Makefile.am (tools.zip): Generate *.lst files always, not
just in JAVA_MAINTAINER_MODE.
* tools/Makefile.in: Regenerated.
2008-10-21 Matthias Klose <doko@ubuntu.com>
* classpath/tools/gnu/classpath/tools/gjdoc/expr/Java*: Move from ...
* classpath/tools/generated/gnu/classpath/tools/gjdoc/expr/ ... here.
* Update .class files.
2008-10-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* tools/Makefile.am:
Always generate parser in the srcdir.
2008-10-21 Matthias Klose <doko@ubuntu.com>
* doc/Makefile.am (MAINTAINERCLEANFILES): Add gjdoc.1.
* doc/Makefile.in: Regenerate.
2008-10-20 Matthias Klose <doko@ubuntu.com>
* configure.ac: Fix path name in check for generated gjdoc parser files.
* configure: Regenerate.
2008-10-20 Matthias Klose <doko@ubuntu.com>
* configure.ac: Don't check for working java, if not configured
with --enable-java-maintainer-mode.
* configure: Regenerate.
2008-10-19 Matthias Klose <doko@ubuntu.com>
* m4/ac_prog_java.m4: Revert previous change.
* m4/ac_prog_javac.m4: Apply it here.
* configure: Regenerate.
2008-10-19 Matthias Klose <doko@ubuntu.com>
* m4/ac_prog_javac.m4: Don't check for working javac, if not configured
with --enable-java-maintainer-mode.
* configure: Regenerate.
* Makefile.in, */Makefile.in: Regenerate.
2008-09-30 Matthias Klose <doko@ubuntu.com>
* m4/ac_prog_antlr.m4: Check for cantlr binary as well.
2008-09-29 Matthias Klose <doko@ubuntu.com>
* m4/ac_prog_antlr.m4: Check for antlr binary as well.
2008-09-28 Matthias Klose <doko@ubuntu.com>
* PR libgcj/37636. Revert:
2008-02-20 Matthias Klose <doko@ubuntu.com>
* tools/Makefile.am ($(TOOLS_ZIP)): Revert part of previous change,
Do copy resource files in JAVA_MAINTAINER_MODE only.
* tools/Makefile.in: Regenerate.
2008-09-14 Matthias Klose <doko@ubuntu.com>
* m4/ac_prog_javac_works.m4, m4/ac_prog_javac.m4, m4/acinclude.m4:
Revert local changes.
* m4/ac_prog_antlr.m4: Check for an runantlr binary.
* tools/Makefile.am, lib/Makefile.am: Revert local changes (JCOMPILER).
* tools/Makefile.am: Remove USE_JAVAC_FLAGS, pass ANTLR_JAR in
GLIBJ_CLASSPATH.
2008-09-14 Matthias Klose <doko@ubuntu.com>
Revert:
Daniel Frampton <zyridium at zyridium.net>
* AUTHORS: Added.
* java/lang/InheritableThreadLocal.java,
* java/lang/Thread.java,
* java/lang/ThreadLocal.java:
Modified to use java.lang.ThreadLocalMap.
* java/lang/ThreadLocalMap.java:
New cheaper ThreadLocal-specific WeakHashMap.
2008-08-15 Matthias Klose <doko@ubuntu.com>
* m4/acinclude.m4 (CLASSPATH_JAVAC_MEM_CHECK): Remove unknown
args for javac.
2008-08-17 Mark Wielaard <mark@klomp.org>
* gnu/java/awt/peer/gtk/CairoGraphics2D.java: Always loadLibrary
gtk-peer.
* gnu/java/awt/peer/gtk/GdkFontPeer.java: Likewise.
* gnu/java/awt/peer/gtk/GdkPixbufDecoder.java: Likewise.
* gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java: Likewise.
* gnu/java/awt/peer/gtk/GtkToolkit.java: Likewise.
* gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java: Likewise.
* gnu/java/awt/peer/gtk/*.class: Rebuilt.
2008-06-28 Matthias Klose <doko@ubuntu.com>
* m4/ac_prog_javac.m4: Disable check for JAVAC, when
not configured with --enable-java-maintainer-mode.
* aclocal.m4, configure: Regenerate.
* native/jni/gstreamer-peer/Makefile.am: Do not link with
libclasspathnative.
* native/jni/gstreamer-peer/Makefile.in: Regenerate.
* tools/Makefile.am, lib/Makefile.am: Use JAVAC for setting
JCOMPILER, drop flags not understood by gcj.
2008-06-24 Tom Tromey <tromey@redhat.com>
PR libgcj/32198:
* tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.java
(compile): Reverse isAssignableFrom test.
* tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.class:
Rebuilt.
2008-04-18 Paolo Bonzini <bonzini@gnu.org>
PR bootstrap/35457
* aclocal.m4: Regenerate.
* configure: Regenerate.
2008-04-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/gen-classlist.sh.in: Avoid grepping each omission, by
building an awk script with a hash for literal files, and
awk regular expressions for the rest.
* configure.ac: Call AC_PROG_AWK.
* configure: Regenerate.
* m4/gcc_attribute.m4 (GCC_ATTRIBUTE): Fix cache variable name.
* tools/Makefile.am (gappletviewer, gjarsigner, gkeytool, gjar)
(gnative2ascii, gserialver, gjavah, grmiregistry, gtnameserv)
(gorbd, grmid, grmic) [!CREATE_WRAPPERS]: Add stub dependencies
for these scripts, to trick automake into hiding the respective
rules for the programs below the CREATE_WRAPPERS conditional.
* aclocal.m4: Regenerate.
* configure: Likewise.
* Makefile.in: Likewise.
* native/jni/Makefile.in: Likewise.
* native/jni/classpath/Makefile.in: Likewise.
* native/jni/gstreamer-peer/Makefile.in: Likewise.
* native/jni/midi-dssi/Makefile.in: Likewise.
* native/jni/gconf-peer/Makefile.in: Likewise.
* native/jni/java-io/Makefile.in: Likewise.
* native/jni/native-lib/Makefile.in: Likewise.
* native/jni/java-util/Makefile.in: Likewise.
* native/jni/java-lang/Makefile.in: Likewise.
* native/jni/midi-alsa/Makefile.in: Likewise.
* native/jni/java-nio/Makefile.in: Likewise.
* native/jni/java-net/Makefile.in: Likewise.
* native/jni/xmlj/Makefile.in: Likewise.
* native/jni/qt-peer/Makefile.in: Likewise.
* native/jni/gtk-peer/Makefile.in: Likewise.
* native/Makefile.in: Likewise.
* native/jawt/Makefile.in: Likewise.
* native/fdlibm/Makefile.in: Likewise.
* native/plugin/Makefile.in: Likewise.
* resource/Makefile.in: Likewise.
* scripts/Makefile.in: Likewise.
* tools/Makefile.in: Likewise.
* doc/Makefile.in: Likewise.
* doc/api/Makefile.in: Likewise.
* lib/Makefile.in: Likewise.
* external/Makefile.in: Likewise.
* external/jsr166/Makefile.in: Likewise.
* external/sax/Makefile.in: Likewise.
* external/w3c_dom/Makefile.in: Likewise.
* external/relaxngDatatype/Makefile.in: Likewise.
* include/Makefile.in: Likewise.
* examples/Makefile.in: Likewise.
2008-04-17 Tom Tromey <tromey@redhat.com>
PR libgcj/35950:
* tools/gnu/classpath/tools/jar/Entry.java: New version from
Classpath.
* tools/classes/gnu/classpath/tools/jar/Entry.class: Update.
2008-03-10 Jim Meyering <meyering@redhat.com>
Don't leak upon failed realloc.
* native/jni/classpath/jcl.c (JCL_realloc): Upon failed realloc,
free the original buffer before throwing the exception.
2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/cp-hacking.texinfo: Fix spacing after periods.
* doc/cp-tools.texinfo: Likewise.
* doc/cp-vmintegration.texinfo: Likewise.
* doc/cp-hacking.texinfo: Fix some typos.
* doc/cp-tools.texinfo: Likewise.
* doc/cp-vmintegration.texinfo: Likewise.
2008-03-02 Jakub Jelinek <jakub@redhat.com>
* gnu/java/rmi/registry/RegistryImpl.java (version): Update
copyright notice dates.
* tools/gnu/classpath/tools/orbd/Main.java (run): Likewise.
2008-02-20 Matthias Klose <doko@ubuntu.com>
* tools/Makefile.am ($(TOOLS_ZIP)): Revert part of previous change,
Do copy resource files in JAVA_MAINTAINER_MODE only.
* tools/Makefile.in: Regenerate.
2008-02-18 Jakub Jelinek <jakub@redhat.com>
* doc/cp-tools.texinfo (@direntry): Prefix info name with cp-.
* doc/cp-hacking.texinfo (@direntry): Likewise.
* doc/cp-vmintegration.texinfo (@direntry): Likewise.
2008-02-06 Matthias Klose <doko@ubuntu.com>
* tools/Makefile.am ($(TOOLS_ZIP)): Copy over rmic template files.
Copy resource files independent of JAVA_MAINTAINER_MODE.
* tools/Makefile.in: Regenerate.
2008-01-28 Tom Tromey <tromey@redhat.com>
* tools/classes/gnu/classpath/tools/native2ascii/Native2ASCII$3.class:
Added.
2008-01-27 Bernhard Fischer <rep.dot.nop@gmail.com>
* java/util/SimpleTimeZone.java (SimpleTimeZone): Fix typo in comment.
* gnu/CORBA/GIOP/v1_2/RequestHeader.java (RequestHeader): Fix typo in
exception message.
2008-01-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/README.jaxp: Fix typos.
2007-09-04 Matthias Klose <doko@ubuntu.com>
* configure.ac: Append libgcj soversion to nativeexeclibdir.
* configure: Regenerate.
2007-08-04 Matthias Klose <doko@ubuntu.com>
* java/util/EnumMap.java (clone): Add cast.
2007-07-12 Matthias Klose <doko@ubuntu.com>
* lib/jazzlib, tools/gnu/classpath/tools/rmi: Remove empty directories.
2007-06-07 Matthias Klose <doko@ubuntu.com>
PR libgcj/32227
* include/config-int.h: Delete, it is a generated file.
2007-06-04 Matthias Klose <doko@ubuntu.com>
* m4/acinclude.m4: Accept GCJ and JIKES.
* configure: Regenerate.
2007-05-31 Matthias Klose <doko@ubuntu.com>
* javax/management/NotificationBroadcasterSupport.java
(getNotificationInfo): Add cast.
* native/jni/qt-peer/Makefile.am (AM_CXXFLAGS): Add libstdc++ include
directories.
* native/jni/qt-peer/Makefile.in: Regenerate.
2007-05-30 H.J. Lu <hongjiu.lu@intel.com>
PR libjava/32098
* configure.ac: Add AC_CONFIG_AUX_DIR(../..).
* aclocal.m4: Regenerated.
* configure: Likewise.
* Makefile.in: Likewise.
2007-04-25 Andrew Haley <aph@redhat.com>
* java/io/ObjectStreamClass.java (ensureFieldsSet): New method.
(setFields): call ensureFieldsSet.
(fieldsSet): New field.
* java/io/ObjectOutputStream.java (writeFields): Call
osc.ensureFieldsSet().
* java/io/ObjectInputStream.java (parseContent): Assign the handle
for a PROXYCLASSDESC immediately after reading the marker.
2007-03-19 Matthias Klose <doko@ubuntu.com>
* configure.ac: New configure option
--enable-generated-files-in-srcdir.
* doc/Makefile.am: Add support to generate files in srcdir,
install the cp-tools documentation in info format.
* configure: Regenerate.
* native/jni/classpath/Makefile.in, native/jni/midi-dssi/Makefile.in,
native/jni/Makefile.in, native/jni/gconf-peer/Makefile.in,
native/jni/java-io/Makefile.in, native/jni/native-lib/Makefile.in,
native/jni/java-util/Makefile.in, native/jni/java-lang/Makefile.in,
native/jni/midi-alsa/Makefile.in, native/jni/java-nio/Makefile.in,
native/jni/java-net/Makefile.in, native/jni/xmlj/Makefile.in,
native/jni/qt-peer/Makefile.in, native/jni/gtk-peer/Makefile.in,
native/Makefile.in, native/jawt/Makefile.in, native/fdlibm/Makefile.in,
native/plugin/Makefile.in, resource/Makefile.in, scripts/Makefile.in,
tools/Makefile.in, doc/Makefile.in, doc/api/Makefile.in,
lib/Makefile.in, external/Makefile.in, external/sax/Makefile.in,
external/w3c_dom/Makefile.in, external/jsr166/Makefile.in,
external/relaxngDatatype/Makefile.in, include/Makefile.in,
examples/Makefile.in: Regenerate.
2007-03-09 Gary Benson <gbenson@redhat.com>
Chris Burdess <dog@gnu.org>
PR classpath/30831
* gnu/xml/dom/ls/SAXEventSink.java: Only set extended document
properties when reader is available.
2007-03-08 Gary Benson <gbenson@redhat.com>
PR classpath/30983:
* gnu/xml/dom/ls/DomLSParser.java (getInputSource):
Do not use the entity resolver to resolve the top-level document.
2007-03-07 Gary Benson <gbenson@redhat.com>
PR classpath/30906:
* resource/META-INF/services/org.w3c.dom.DOMImplementationSourceList:
New file.
2007-03-06 Matthias Klose <doko@ubuntu.com>
* doc/Makefile.am(gkeytool.pod): Don't use sed -i.
* doc/Makefile.in: Regenerate.
2007-03-06 Tom Tromey <tromey@redhat.com>
* tools/gnu/classpath/tools/javah/Main.java (getName): New
method.
(getParser): Now protected. Use getName. Add '-v' alias for
--verbose.
(postParse): New method.
(run): Now protected. Use postParse.
* tools/gnu/classpath/tools/javah/GcjhMain.java: New file.
* tools/Makefile.in: Rebuilt.
* tools/Makefile.am: Remove vm-tools.lst before creating it.
2007-03-05 Matthias Klose <doko@ubuntu.com>
* doc/Makefile.am(man_MANS): Add $(TOOLS_MANFILES).
* doc/Makefile.in: Regenerate.
2007-02-26 Jakub Jelinek <jakub@redhat.com>
* java/util/TimeZone.java (getDefaultDisplayName): Don't
check if TimeZone is instanceof SimpleTimeZone.
2007-02-21 Gary Benson <gbenson@redhat.com>
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()
2007-02-20 Matthias Klose <doko@ubuntu.com>
* Merge doc update from classpath HEAD.
* doc/texi2pod.pl: Not imported.
* doc/Makefile.am: Use GCC's texi2pod.pl
* doc/Makefile.in: Regenerate.
2007-02-20 Gary Benson <gbenson@redhat.com>
* javax/management/MBeanServer.java: Updated.
* javax/management/MBeanServerConnection.java: Likewise.
* javax/management/ObjectName.java: Likewise.
* javax/management/StandardMBean.java: Likewise.
2007-02-15 David Daney <ddaney@avtrex.com>
* tools/Makefile.am (TOOLS_ZIP): Add classes from vm-tools-packages.
* tools/Makefile.in: Regenerated.
2007-02-15 Gary Benson <gbenson@redhat.com>
* javax/management/AttributeList.java: Updated.
* javax/management/MBeanServerDelegate.java: Likewise.
* javax/management/MBeanServerFactory.java: Likewise.
* javax/management/StandardMBean.java: Likewise.
2007-02-15 Gary Benson <gbenson@redhat.com>
* gnu/javax/management/Server.java
(registerMBean): Always register objects that implement the
MBeanRegistration interface, and check the name returned by
preRegister before using it.
2007-02-15 Gary Benson <gbenson@redhat.com>
* javax/management/ObjectName.java:
(getKeyPropertyList()): Remove cast and call
to UnmodifiableMap.
2007-02-14 Gary Benson <gbenson@redhat.com>
* javax/management/ObjectName.java
(toString): Return this item's canonical name.
2007-02-12 Tom Tromey <tromey@redhat.com>
* java/util/Collections.java (UnmodifiableMap.toArray): Imported
changes from Classpath.
2007-02-09 Gary Benson <gbenson@redhat.com>
* javax/management/ObjectName.java
(quote): Initialize StringBuilder correctly.
2007-02-08 Gary Benson <gbenson@redhat.com>
* javax/management/MBeanServerFactory.java
(servers): Initialize.
(createMBeanServer): Don't initialize servers.
2007-01-31 Tom Tromey <tromey@redhat.com>
* tools/Makefile.in: Rebuilt.
* tools/Makefile.am (noinst_SCRIPTS): Renamed from bin_SCRIPTS.
(noinst_DATA): Renamed from TOOLS_DATA.
2007-01-20 Matthias Klose <doko@debian.org>
* native/jni/gtk-peer/Makefile.am, native/jawt/Makefile.am: Install
into nativeexeclibdir instead of gcjversionedlibdir.
* native/jni/gtk-peer/Makefile.in, native/jawt/Makefile.in: Regenerate.
2007-01-16 Jack Howarth <howarth@bromo.med.uc.edu>
* configure.ac: Use multi.m4 from aclocal rather than
custom code. Use multi_basedir instead libgcj_basedir.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* Makefile.in: Regenerate.
2007-01-10 Matthias Klose <doko@debian.org>
Readd missing chunks from r116332:
* m4/acinclude.m4 (CLASSPATH_TOOLEXECLIBDIR): New macro.
* resource/Makefile.am (loggingdir): Define to
toolexeclibdir.
(securitydir): Likewise.
* configure.ac: Call CLASSPATH_TOOLEXECLIBDIR.
Set default nativeexeclibdir using toolexeclibdir.
Readd missing chunks from r115839:
* native/jni/gtk-peer/Makefile.am (libgtkpeer_la_LDFLAGS):
Add -avoid-version.
* native/jawt/Makefile.am (libjawt_la_LDFLAGS): Add -avoid-version.
* configure, Makefile.in, doc/Makefile.in, doc/api/Makefile.in,
examples/Makefile.in, external/Makefile.in,
external/jsr166/Makefile.in, external/relaxngDatatype/Makefile.in,
external/sax/Makefile.in, external/w3c_dom/Makefile.in,
include/Makefile.in, lib/Makefile.in, native/Makefile.in,
native/fdlibm/Makefile.in, native/jawt/Makefile.in,
native/jni/Makefile.in, native/jni/classpath/Makefile.in,
native/jni/gconf-peer/Makefile.in, native/jni/gtk-peer/Makefile.in
native/jni/java-io/Makefile.in, native/jni/java-lang/Makefile.in,
native/jni/java-net/Makefile.in, native/jni/java-nio/Makefile.in,
native/jni/java-util/Makefile.in, native/jni/midi-alsa/Makefile.in,
native/jni/midi-dssi/Makefile.in, native/jni/native-lib/Makefile.in,
native/jni/qt-peer/Makefile.in, native/jni/xmlj/Makefile.in,
native/plugin/Makefile.in, resource/Makefile.in, scripts/Makefile.in,
tools/Makefile.in: Regenerate
2007-01-10 Matthias Klose <doko@debian.org>
* resource/gnu/regexp, tools/gnu/classpath/tools/rmi/rmic,
tools/gnu/classpath/tools/rmi/rmid, tools/gnu/classpath/tools/giop,
doc/www.gnu.org, doc/unicode, testsuite, testsuite/java.sun.awt,
testsuite/javax.swing.text.html.parser, testsuite/java.lang,
testsuite/java.opstack, testsuite/java.sun.tools, testsuite/java.text,
testsuite/scheme, testsuite/config, testsuite/java.net, testsuite/lib,
testsuite/java.io, testsuite/java.util, native/target,
native/testsuite, native/vmi, org/omg/CORBA/SendingContext,
gnu/regexp, test, compat: Remove empty directories.
2006-12-23 Andreas Tobler <a.tobler@schweiz.org>
* classpath/tools/Makefile.am: Replace cp -a with a more portable
cp -pR.
* classpath/tools/Makefile.in: Regenerate.
2006-12-18 Tom Tromey <tromey@redhat.com>
* tools/Makefile.in: Rebuilt.
* tools/Makefile.am (GLIBJ_CLASSPATH): Look in srcdir.
2006-12-18 Tom Tromey <tromey@redhat.com>
* tools/Makefile.in: Rebuilt.
* tools/Makefile.am ($(TOOLS_ZIP)): Put classes in srcdir.
* tools/asm, tools/classes: Check in .class files.
2006-12-18 Gary Benson <gbenson@redhat.com>
* tools/Makefile.am: Fix typo.
* tools/Makefile.in: Rebuilt.
2006-12-15 Andrew Haley <aph@redhat.com>
* tools/Makefile.am (TOOLS_ZIP): Pass -g -w to javac.
Create all-classes.lst that contains all source filenames.
Delete asm.lst.
2006-12-15 Tom Tromey <tromey@redhat.com>
* configure, lib/Makefile.in: Rebuilt.
* lib/Makefile.am (compile-classes): Use JAVA_MAINTAINER_MODE.
* configure.ac: Added --enable-java-maintainer-mode.
2006-12-12 Tom Tromey <tromey@redhat.com>
* 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-12-11 Tom Tromey <tromey@redhat.com>
* Merged in Classpath from libgcj-import-20061211.
2006-10-17 Tom Tromey <tromey@redhat.com>
* sun/reflect/annotation/AnnotationInvocationHandler.java
(invoke): Clone array values before return.
(create): New method.
(arrayClone): Likewise.
2006-10-12 Tom Tromey <tromey@redhat.com>
* lib/Makefile.in: Rebuilt.
* lib/Makefile.am (JAVAC): Put classes in srcdir.
(compile-classes): Conditional on MAINTAINER_MODE.
2006-07-18 Tom Tromey <tromey@redhat.com>
* lib/Makefile.in: Rebuilt.
* lib/Makefile.am (JAVAC): Add -w, -g, and --encoding.
2006-07-06 Tom Tromey <tromey@redhat.com>
* lib/Makefile.in: Rebuilt.
* lib/Makefile.am (JAVAC): Define when FOUND_GCJ is true.
(compile-classes): Remove special case for gcj.
2006-06-23 Tom Tromey <tromey@redhat.com>
* Imported Classpath generics 0.91, presesrving local changes.
2006-06-09 Tom Tromey <tromey@redhat.com>
* lib/Makefile.gcj (GCJF): Added -g and -ftarget=1.5.
2006-05-30 Thomas Fitzsimmons <fitzsim@redhat.com>
* native/jni/gtk-peer/Makefile.am (gcc_version): New variable.
(gcjversionedlibdir): Likewise.
(libgtkpeer_la_LDFLAGS): Likewise.
Install libgtkpeer.so in GCJ versioned library directory.
* native/jawt/Makefile.am (gcc_version): New variable.
(gcjversionedlibdir): Likewise.
(libjawt_la_LDFLAGS): Likewise.
Rename libjawtgnu.so libjawt.so. Install libjawt.so in GCJ
versioned library directory.
* gnu/java/awt/peer/gtk/GdkFontPeer.java (static): Call
System.loadLibrary unconditionally.
* gnu/java/awt/peer/gtk/GdkPixbufDecoder.java: Likewise.
* gnu/java/awt/peer/gtk/GdkGraphics2D.java: Likewise.
* gnu/java/awt/peer/gtk/GdkGraphics.java: Likewise.
* gnu/java/awt/peer/gtk/GtkToolkit.java: Likewise.
* gnu/java/awt/peer/gtk/GdkTextLayout.java: Likewise.
2006-05-19 Andreas Tobler <a.tobler@schweiz.ch>
* include/config-int.h: Delete, it is a generated file.
2006-04-05 Tom Tromey <tromey@redhat.com>
PR libgcj/26625:
* lib/Makefile.in: Rebuilt.
* lib/Makefile.am (compile-classes): Touch the output file.
2006-04-04 Tom Tromey <tromey@redhat.com>
* lib/gen-classlist.sh.in: Correct handle generated files.
2006-04-04 Mark Wielaard <mark@klomp.org>
* lib/gen-classlist.sh.in: Use classes.tmp, not classes.2
as temporary file name.
2006-04-04 Tom Tromey <tromey@redhat.com>
* lib/split-for-gcj.sh: Updated for multi-field format.
* lib/Makefile.am (CLEANFILES): Added classes.2.
* lib/gen-classlist.sh.in (GCJ): Removed. Create classes.1 and
classes.2 using multiple fields.
2006-04-03 Bernhard Rosenkraenzer <bero@arklinux.org>
PR gcc/26901:
* Makefile.in: Rebuilt.
* Makefile.am (SUBDIRS): Remove 'tools'.
(DIST_SUBDIRS): Likewise.
2006-03-16 Tom Tromey <tromey@redhat.com>
PR libgcj/26706:
* aclocal.m4, configure: Rebuilt.
* configure.ac (GCC_NO_EXECUTABLES): Moved earlier.
2006-03-15 Tom Tromey <tromey@redhat.com>
PR libgcj/26688:
* lib/Makefile.in: Rebuilt.
* lib/Makefile.am (propertydirs): Ignore .svn directories.
(metafiles): Likewise.
2006-03-10 Tom Tromey <tromey@redhat.com>
For PR libgcj/25713:
* java/util/zip/InflaterInputStream.java (read): Replaced with
libgcj implementation.
2006-03-08 Tom Tromey <tromey@redhat.com>
PR libgcj/24183:
* native/jni/xmlj/Makefile.in: Rebuilt.
* native/jni/xmlj/Makefile.am (nativelib_LTLIBRARIES): Renamed
(reverted local patch).
2006-01-16 Mark Wielaard <mark@klomp.org>
* native/fdlibm/namespace.h: Empty for gcj.
2006-01-14 Anthony Green <green@redhat.com>
* java/net/ServerSocket.java (accept): Remove bogus
security check.
(implAccept): Add FIXME comment.
2006-01-06 Tom Tromey <tromey@redhat.com>
PR libgcj/23499:
* lib/Makefile.in: Rebuilt.
* lib/Makefile.am (glibj_DATA): Commented out.
2005-12-01 Anthony Green <green@redhat.com>
PR bootstrap/25207
* configure.ac: Make sure we have an alsa library in addition to
the headers. This extra test is required for systems with
multilibs.
* configure: Rebuilt.
2005-10-03 Tom Tromey <tromey@redhat.com>
* native/jawt/Makefile.in: Rebuilt.
* native/jawt/Makefile.am (noinst_LTLIBRARIES): Renamed.
* native/jni/xmlj/Makefile.in: Rebuilt.
* native/jni/xmlj/Makefile.am (noinst_LTLIBRARIES): Renamed.
* native/jni/qt-peer/Makefile.in: Rebuilt.
* native/jni/qt-peer/Makefile.am (noinst_LTLIBRARIES): Renamed.
* native/jni/gtk-peer/Makefile.in: Rebuilt.
* native/jni/gtk-peer/Makefile.am (noinst_LTLIBRARIES): Renamed.
2005-10-03 Tom Tromey <tromey@redhat.com>
PR libgcj/24057:
* include/Makefile.in: Rebuilt.
* include/Makefile.am: Don't install headers.
2005-09-30 Tom Tromey <tromey@redhat.com>
PR libgcj/24051:
* Makefile.in: Rebuilt.
* Makefile.am (ACLOCAL_AMFLAGS): Added -I ../../config
* configure: Rebuilt.
* configure.ac: Use GCC_NO_EXECUTABLES
2005-09-23 Tom Tromey <tromey@redhat.com>
* native/jawt/.cvsignore: Likewise.
* native/jni/qt-peer/.cvsignore
* native/jawt/Makefile.in: Added.
* native/jni/qt-peer/Makefile.in: Likewise.
2005-09-23 Tom Tromey <tromey@redhat.com>
Imported Classpath 0.18.
2005-08-23 Tom Tromey <tromey@redhat.com>
* configure: Rebuilt.
* configure.ac: Fixed typo.
2005-08-22 Tom Tromey <tromey@redhat.com>
PR libgcj/23498:
* doc/Makefile.am (info_TEXINFOS): Commented out.
* doc/Makefile.in: Rebuilt.
2005-08-22 Kelley Cook <kcook@gcc.gnu.org>
* Makefile.am (ACLOCAL_AMFLAGS): New.
* Makefile.in: Regenerate.
2005-08-22 Tom Tromey <tromey@redhat.com>
PR libgcj/23498:
* doc/Makefile.am (info_TEXINFOS): Commented out.
* doc/Makefile.in: Rebuilt.
2005-08-11 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* lib/split-for-gcj.sh: Don't use unportable %{parameter%word}.
Don't use unportable !.
2005-07-15 Tom Tromey <tromey@redhat.com>
* ChangeLog.gcj, Makefile.in, aclocal.m4, config.guess,
config.sub, configure, ltmain.sh, doc/Makefile.in,
doc/api/Makefile.in, examples/Makefile.in, external/Makefile.in,
external/sax/Makefile.in, external/w3c_dom/Makefile.in,
include/Makefile.in, include/config.h.in, include/jni.h,
lib/Makefile.in, native/Makefile.in, native/fdlibm/Makefile.in,
native/jni/Makefile.in, native/jni/classpath/Makefile.in,
native/jni/gtk-peer/Makefile.in, native/jni/java-io/Makefile.in,
native/jni/java-lang/Makefile.in, native/jni/java-net/Makefile.in,
native/jni/java-nio/Makefile.in, native/jni/java-util/Makefile.in,
native/jni/xmlj/Makefile.in, native/target/Makefile.in,
native/target/Linux/Makefile.in,
native/target/generic/Makefile.in, resource/Makefile.in,
scripts/Makefile.in: Added.
* native/fdlibm/.cvsignore, native/jni/xmlj/.cvsignore,
native/jni/java-util/.cvsignore, native/jni/classpath/.cvsignore,
native/jni/java-net/.cvsignore, native/jni/java-io/.cvsignore,
native/jni/.cvsignore, native/jni/java-lang/.cvsignore,
native/jni/gtk-peer/.cvsignore, native/jni/java-nio/.cvsignore,
native/testsuite/.cvsignore, native/.cvsignore,
native/vmi/.cvsignore, native/target/.cvsignore,
native/target/generic/.cvsignore, native/target/Linux/.cvsignore,
include/.cvsignore, doc/api/.cvsignore,
doc/www.gnu.org/faq/.cvsignore,
doc/www.gnu.org/downloads/.cvsignore,
doc/www.gnu.org/docs/.cvsignore, doc/www.gnu.org/.cvsignore,
doc/www.gnu.org/events/.cvsignore,
doc/www.gnu.org/announce/.cvsignore, doc/.cvsignore,
resource/.cvsignore, external/w3c_dom/.cvsignore,
external/sax/.cvsignore, external/.cvsignore,
java/util/.cvsignore, .cvsignore, test/java.net/.cvsignore,
test/java.io/.cvsignore, test/.cvsignore,
test/java.util/.cvsignore, test/gnu.java.lang.reflect/.cvsignore,
test/java.lang.reflect/.cvsignore, examples/.cvsignore,
lib/.cvsignore, gnu/classpath/.cvsignore, gnu/test/.cvsignore,
compat/java.net/.cvsignore, compat/.cvsignore, vm/.cvsignore,
vm/reference/.cvsignore, scripts/.cvsignore: Updated.

View File

@ -1,205 +0,0 @@
This is an historic file listing changes from the old GNU JAXP project.
GNU JAXP is now part of GNU Classpath. New changes to these files are
listed in the main ChangeLog file or documented in the external
subdirectories for the w3c dom and sax sources.
2004-12-22 Chris Burdess <dog@gnu.org>
* Makefile.am: Generate META-INF/services factory configuration files.
2004-12-17 Mark Wielaard <mark@klomp.org>
* css,html2: Updated APIs to final versions of W3C specifications
(DOM Level 2).
2004-12-15 Mark Wielaard <mark@klomp.org>
* GnomeNodeIterator.java: Renamed to DomNodeIterator.java.
2004-12-10 Chris Burdess <dog@gnu.org>
* org/xml/sax: Updated version of SAX API to sax2r3 final.
2004-12-04 Chris Burdess <dog@gnu.org>
* README,INSTALL,AUTHORS: Updated documentation.
2004-12-03 Andrew Overholt <overholt@redhat.com>
* autogen.sh: New file.
2004-11-27 Chris Burdess <dog@gnu.org>
* Makefile.am: Removed redundant 'sources' and 'classes' makefile
variables. Added -W-no-long-long to libxmlj compilation flags.
2004-11-26 Andrew Overholt <overholt@redhat.com>
* Makefile.am: Update for gcj.
* configure.ac: Likewise.
* Makefile.in: Update generated.
* aclocal.m4: Likewise.
* configure: Likewise.
* config/config.guess: Likewise.
* config/config.sub: Likewise.
* config/ltmain.sh: Likewise.
2004-10-06 Chris Burdess <dog@gnu.org>
* Makefile.am: Fixes to permit gcj compilation.
2004-10-27 Chris Burdess <dog@gnu.org>
* parsers, transform, dom, sax, stream: API rewritten from
scratch to satisfy copyright assignment.
2004-10-13 Arnaud Vandyck <avdyk@gnu.org>
Reported by John Kristian <jk2004@engineer.com>:
* manifest.mf: added Implementation Version field.
2004-10-06 Chris Burdess <dog@gnu.org>
* Makefile.am: Make invocation of javadoc gjdoc-compatible.
2004-09-03 Chris Burdess <dog@gnu.org>
* all: Replaced GPL exception with new exception text.
2004-09-01 Chris Burdess <dog@gnu.org>
* all: Reassigned David Brownell's copyright to FSF.
2004-05-12 Chris Burdess <dog@gnu.org>
* (dom): Updated to DOM Level 3 Core and L&S interfaces.
* GnomeDocumentBuilder.java: Fixed stream retrieval bug.
2004-05-05 Chris Burdess <dog@gnu.org>
* Makefile.am, acinclude.m4: Added gcjh detection. Makefile will now
rebuild out of date JNI headers and gnujaxp.jar.
2004-04-22 Arnaud Vandyck <avdyk@ressource-toi.org>
* source: sources directory has been moved to source directory,
src has been deleted. Sorry for the inconvenience.
2004-04-20 Arnaud Vandyck <avdyk@ressource-toi.org>
Reported by Maarten Coene <MacBelgium@toughguy.net>:
* src/gnu/xml/aelfred2/JAXPFactory.java (getFeature): throws a
NullPointerException if you check for a feature that hasn't been
set at the factory level.
2004-04-19 Arnaud Vandyck <avdyk@ressource-toi.org>
* src/xmlj_io.h, src/xmlj_io.c, src/xmlj_error.h,
src/xmlj_error.c, src/libxsltj.c,
src/gnu/xml/libxmlj/transform/URIResolverProxy.java,
src/gnu/xml/libxmlj/transform/TransformerImpl.java,
src/gnu/xml/libxmlj/transform/TransformerFactoryImpl.java,
src/gnu/xml/libxmlj/transform/TransformTest.java,
src/gnu/xml/libxmlj/transform/TemplatesImpl.java,
src/gnu/xml/libxmlj/transform/SourceWrapper.java,
src/gnu/xml/libxmlj/transform/SourceLocatorImpl.java,
src/gnu/xml/libxmlj/transform/LibxsltStylesheet.java,
src/gnu/xml/libxmlj/transform/LibxmlDocument.java,
src/gnu/xml/libxmlj/transform/JavaContext.java,
src/gnu/xml/libxmlj/transform/IOToolkit.java,
src/gnu/xml/libxmlj/transform/ErrorListenerProxy.java,
src/gnu/xml/libxmlj/transform/DefaultURIResolverImpl.java,
src/gnu/xml/libxmlj/transform/DefaultErrorListenerImpl.java:
changed the copyright holder to FSF and changed the license to
GPL+linking exception, many thanks to Julian Scheid who wrote the
code and accepted to donate his code to the FSF and change the
license to GPL + linking exception.
* README: updated (added the libxmlj README comments)
* AUTHORS: added Julian.
* INSTALL: updated to match the current scheme (new dependency,
new build system)
2004-04-15 Arnaud Vandyck <avdyk@ressource-toi.org>
* src/gnu/xml/aelfred2/SAXDriver.java (SAXDriver): removed the
comparison choice because an org.xml.sax.SAXNotSupportedException
must be caught, so it'll slow the benefit of the interned strings!
* src/gnu/xml/pipeline/WellFormednessFilter.java (startDTD)
(notationDecl, unparsedEntityDecl): reverted the '==' comparison
between String's because they are internaled and there is no way
to choose if the comparison must use '==' or 'equals'
* src/gnu/xml/pipeline/ValidationConsumer.java: reverted the '=='
comparison between String's because they are internaled and there
is no way to choose if the comparison must use '==' or 'equals'
* src/gnu/xml/pipeline/DomConsumer.java:
(populateAttributes): using equals because I'm not sure "" is
interned?
* src/gnu/xml/aelfred2/XmlParser.java (parseAttribute)
(parseAttDef, readAttType, parseDefault)
(setInternalEntity, pushURL): if string-interning use the '=='
comparison, else, use 'equals'
* src/gnu/xml/aelfred2/SAXDriver.java (attribute, startElement)
(getType): if string-interning use the '==' comparison, else, use
'equals'
2004-04-14 Arnaud Vandyck <avdyk@ressource-toi.org>
* src/gnu/xml/aelfred2/SAXDriver.java (getFeature):
http://xml.org/sax/features/string-interning can now be set to
false so comparison if perform using equals (if true, comparison
is performed with '==').
* src/gnu/xml/util/XCat.java (startElement): reverted the '=='
comparison between String's because they are internaled and there
is no way to choose if the comparison must use '==' or 'equals'
* src/javax/xml/transform/sax/SAXResult.java, SAXSource.java,
SAXTransformerFactory.java, TemplatesHandler.java,
TransformerHandler.java,
src/javax/xml/transform/stream/StreamResult.java,
StreamSource.java, src/javax/xml/transform/dom/DOMLocator.java,
DOMResult.java, DOMSource.java,
src/javax/xml/parsers/ClassStuff.java, DocumentBuilder.java,
DocumentBuilderFactory.java, FactoryConfigurationError.java,
ParserConfigurationException.java, SAXParser.java,
SAXParserFactory.java, src/javax/xml/transform/ClassStuff.java,
ErrorListener.java, OutputKeys.java, Result.java, Source.java,
Templates.java, Transformer.java,
TransformerConfigurationException.java, TransformerException.java,
TransformerFactory.java,
TransformerFactoryConfigurationError.java,
src/gnu/xml/libxmlj/transform/DefaultErrorListenerImpl.java,
DefaultURIResolverImpl.java, ErrorListenerProxy.java,
IOToolkit.java, JavaContext.java, LibxmlDocument.java,
SourceLocatorImpl.java, SourceWrapper.java, TemplatesImpl.java,
TransformTest.java, TransformerImpl.java,
TransformerFactoryImpl.java, URIResolverProxy.java: removed the id
cvs tag to ease integration in other cvs repositories
2004-04-08 Arnaud Vandyck <avdyk@ressource-toi.org>
* NEWS: initial commit
* INSTALL: initial commit
* src: sources directory has been moved to src directory
* configure.ac, Makefile.am: now build jaxp and libxmlj together
* Makefile.aj, automakejar, configure.in: removed, no more used.
2004-02-05 Arnaud Vandyck <avdyk@users.sourceforge.net>
* ChangeLog.libxmlj, source/*.c, source/*h,
source/gnu/xml/libxmlj/transform/*.*: imported from libxmlj
* ChangeLog.gnujaxp: added to have some history of the project

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More