2003-11-14 Tom Fitzsimmons <fitzsim@redhat.com>
* java/awt/GridBagLayout.java (getLayoutDimensions): Return array of two
zero-length int arrays when layoutInfo is null.
(getLayoutWeights): Return array of two zero-length double arrays when
layoutInfo is null.
From-SVN: r73622
* jni.cc (_Jv_JNI_GetStringUTFChars): Pass length of string to
JvGetStringUTFRegion.
* java/lang/natPosixProcess.cc (new_string): Pass length of string
to JvGetStringUTFRegion.
* java/lang/natDouble.cc (parseDouble): Pass length of string to
JvGetStringUTFRegion.
* java/lang/natWin32Process.cc (startProcess): Pass length of
string to JvGetStringUTFRegion.
* java/lang/natClass.cc (forName): Pass length of string to
JvGetStringUTFRegion.
* gnu/gcj/runtime/natNameFinder.cc (getExternalLabel): Pass length
of string to JvGetStringUTFRegion.
* gnu/gcj/convert/natIconv.cc (init): Pass length of string to
JvGetStringUTFRegion.
* gnu/awt/gtk/natGtkLabelPeer.cc (setText): Pass length of string
to JvGetStringUTFRegion.
* gnu/awt/gtk/natGtkButtonPeer.cc (setLabel): Pass length of
string to JvGetStringUTFRegion.
From-SVN: r73571
2003-11-11 Micheal Koch <konqueror@gmx.de>
* java/net/URLStreamHandler.java (toExternalForm): Print port only
if host is printed too and port was really given to URL.
From-SVN: r73445
PR libgcj/12231
* java/lang/Win32Process.java (hasExited) Changed from
public to private.
(startProcess): Likewise.
(cleanup): Likewise.
* java/lang/natWin32Process.cc (cleanup) Don't close
input, output and error streams.
(ChildProcessPipe): New helper class.
(startProcess): Refactored to use ChildProcessPipe.
Use CREATE_NO_WINDOW when launching child process.
From-SVN: r73326
* include/win32.h (_Jv_platform_close_on_exec): Changed
signature and declared extern.
* win32.cc (_Jv_platform_close_on_exec): Implemented.
* gnu/java/net/natPlainDatagramSocketImplWin32.cc
(create): Use new signature of _Jv_platform_close_on_exec.
* gnu/java/net/natPlainSocketImplWin32.cc
(create): Eliminated a few typecasts
Use new signature of _Jv_platform_close_on_exec.
(accept): Eliminated a few typecasts
Use new signature of _Jv_platform_close_on_exec.
* java/io/natFileDescriptorWin32.cc (open): Use
_Jv_platform_close_on_exec.
From-SVN: r73325
* win32.cc: (dirExists) Internal helper function to
test for directory existence.
(getUserHome) New helper function refactored out
of _Jv_platform_initProperties. Uses USERPROFILE
instead of HOMEDIR and attempts to support Win9X and NT.
(_Jv_platform_initProperties) Use getUserHome.
From-SVN: r73117
2003-10-30 Thomas Fitzsimmons <fitzsim@redhat.com>
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c (create): Turn on
word wrapping.
From-SVN: r73093
2003-10-29 Mark Wielaard <mark@klomp.org>
From Guilhem Lavaux <guilhem.lavaux@free.fr>
* java/text/DateFormat.java (Field): New public static inner class.
* java/text/Format.java (Field): Likewise.
(formatToCharacterIterator): New method.
* java/text/FormatCharacterIterator.java: New file.
2003-10-29 Mark Wielaard <mark@klomp.org>
From Guilhem Lavaux <guilhem.lavaux@free.fr>
* java/util/Currency.java: New file.
2003-10-29 Michael Koch <konqueror@gmx.de>
* Makefile.am (ordinary_java_source_files): Added
java/text/FormatCharacterIterator.java and java/util/Currency.java.
* Makefile.in: Regenerated.
From-SVN: r73046
2003-10-29 Julian Dolby <dolby@us.ibm.com>
* javax/naming/spi/NamingManager.java (getContinuationContext): Call
getObjectInstance() with Object, Name, Context and environment
Hashtable from exception. Call fillInStackTrace() on exception when
rethrown.
* javax/naming/InitialContext.java (lookup(Name)): When a
CannotProceedException is thrown use the ContinuationContext.
(lookup(String)): Likewise.
(close): Clear myProps and defaultInitCtx.
From-SVN: r73041
2003-10-26 Bryce McKinlay <bryce@mckinlay.net.nz>
* java/lang/reflect/Constructor.java (toString): Avoid extra
whitespace on constructor with no modifiers.
* java/lang/reflect/natConstructor.java (newInstance): Look up
caller and perform accessibility check only if constructor is
non-public and accessible flag is not set.
2003-10-26 Bryce McKinlay <bryce@mckinlay.net.nz>
* jni.cc (_Jv_JNI_CallAnyMethodV, _Jv_JNI_CallAnyMethodA,
_Jv_JNI_CallAnyVoidMethodV, _Jv_JNI_CallAnyVoidMethodA): Don't
use _Jv_LookupDeclaredMethod(). Call _Jv_CallAnyMethodA with
is_virtual_call argument.
* include/jvm.h (_Jv_isVirtualMethod): Moved and renamed from
natClass.cc.
* java/lang/natClass.cc (_Jv_LayoutVTableMethods): Use
_Jv_isVirtualMethod.
* java/lang/reflect/natMethod.cc (invoke): Don't use
_Jv_LookupDeclaredMethod.
(_Jv_CallAnyMethodA): New is_virtual_call argument. If specified,
look up method in target object's vtable.
From-SVN: r72942
PR libgcj/11780:
* java/lang/reflect/natMethod.cc (invoke): Look up caller and
perform accessibility check only if target is non-public and
accessible flag is not set.
* java/lang/reflect/natField.cc (getAddr): Likewise.
From-SVN: r72918
2003-10-24 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkDialogPeer.java (handleEvent):
Remove method.
* gnu/java/awt/peer/gtk/GtkWindowPeer.java (postWindowEvent):
New method.
* java/awt/Window.java (Window(Window,GraphicsConfiguration),
show, hide, dispose, getOwnedWindows): Synchronize on tree lock.
(dispose): Post WINDOW_CLOSED event.
(addWindowFocusListener, addWindowStateListener): Assign result
of multicaster add back to window listener.
(removeWindowFocusListener, removeWindowStateListener): Assign
result of multicaster remove back to window listener.
(dispatchEventImpl): Add null checks for focus and state
listeners.
(processWindowEvent): Handle case where windowListener is null
but state or focus listeners exist.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c: Add JNI
glue for postWindowEvent.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
(window_delete_cb, window_destroy_cb, window_show_cb,
window_focus_in_cb, window_focus_out_cb, window_window_state_cb,
window_get_new_state): New functions.
* jni/gtk-peer/gtkpeer.h: Define window event and frame state
macros. Declare postWindowEventID.
From-SVN: r72906
2003-10-22 Andrew Haley <aph@redhat.com>
* lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
(java_get_callee_fndecl): New.
* jcf-parse.c (java_parse_file): Call emit_catch_table().
* java-tree.h (ctable_decl): New.
(catch_classes): New.
(java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
* decl.c (java_init_decl_processing): Add catch_class_type.
Add ctable_decl.
Add catch_classes field.
* class.c (build_indirect_class_ref): Break out from
build_class_ref.
(make_field_value): Check flag_indirect_dispatch.
(make_class_data): Ditto.
Tidy uses of PUSH_FIELD_VALUE.
Add field catch_classes.
(make_catch_class_record): New.
* java-tree.h (PUSH_FIELD_VALUE): Tidy.
2003-10-22 Andrew Haley <aph@redhat.com>
* java/lang/natClass.cc (initializeClass): Call
_Jv_linkExceptionClassTable.
(_Jv_LinkSymbolTable): Call )_Jv_ThrowNoSuchMethodError. Call
_Jv_Defer_Resolution on a method whose ncode is NULL.
(_Jv_linkExceptionClassTable): New function.
(_Jv_LayoutVTableMethods): If superclass looks like a constant pool
entry, look it up.
* java/lang/Class.h (struct _Jv_CatchClass): New.
(_Jv_linkExceptionClassTable): New friend.
(_Jv_Defer_Resolution): New friend.
(class Class.catch_classes): New field.
* include/java-interp.h (Jv_Defer_Resolution): New method.
(_Jv_PrepareClass): Make a friend of _Jv_MethodBase.
(_Jv_MethodBase.deferred): New field.
(_Jv_Defer_Resolution): New function.
* resolve.cc (_Jv_PrepareClass): Resolve deferred handlers.
* exception.cc (get_ttype_entry): Change return type to void**.
(PERSONALITY_FUNCTION): Remove all code related to using a
Utf8Const* for a match type. Change match type to be a pointer to
a pointer, rather than a pointer to a Class.
* defineclass.cc (handleCodeAttribute): Initialize
method->deferred.
(handleMethodsEnd): Likewise.
From-SVN: r72886
2003-10-22 David Daney <ddaney@avtrex.com)
* include/mips-signal.h: New file.
* sysdep/dwarf2-backtrace.cc: New file.
* sysdep/mips: New directory.
* sysdep/mips/locks.h: New file.
* Makefile.am(extra_cc_files): New, to allow extra c++ files to be
added to libgcj.
(extra_cc_source_files): Ditto.
* configure.host(disable_dladdr): New shell variable passed to
configure.
(mips*-*-linux*): sysdeps_dir=mips,
can_unwind_signal=yes, disable_dladdr=yes, use -mxgot.
(mipsel*-linux* | mipsisa32el*-linux*): Enable hash synchronization.
* configure.in:(mips*-*-linux*): Use sysdep/dwarf2-backtrace.cc to
generate backtrace, and include/mips-signal.h as SIGNAL_HANDLER
(HAVE_DLADDR): Make it depend on setting of disable_dladdr.
(EXTRA_CC_FILES): New, to support conditional addition of
sysdep/dwarf2-backtrace.cc.
* configure: Regenerated.
* Makefile.in: Regenerated.
* gcj/Makefile.in: Regenerated.
* include/config.h.in: Regenerated.
* include/Makefile.in: Regenerated.
* testsuite/Makefile.in: Regenerated.
From-SVN: r72808