summaryrefslogtreecommitdiffstats
path: root/libjava
Commit message (Collapse)AuthorAgeFilesLines
* For PR libgcj/5103:tromey2001-12-145-1/+67
| | | | | | | | | | | * libjava.jni/cxxtest.out: New file. * libjava.jni/cxxtest.cc: New file. * libjava.jni/cxxtest.java: New file. * libjava.jni/jni.exp (gcj_jni_test_one): If there is no .c file, assume there is a .cc file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48012 138bc75d-0d04-0410-961f-82ee72b054a4
* * libjava/prims.cc: Some old cleanups. The collector nowhboehm2001-12-145-37/+79
| | | | | | | | | | | | | | handles test for out of memory. * libjava/prims.cc, libjava/gcj/javaprims.h: (_Jv_AllocObjectNoInitNoFinalizer, _Jv_AllocObjectNoFinalizer): New functions for finalizer-free allocation. (jvmpi_notify_alloc): Became separate function. * libjava/java/lang/Object.h, libjava/include/jvm.h: Adjust for revised vtable layout on IA64. With TARGET_VTABLE_USES_DESCRIPTORS, there is only one extra descriptor. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48002 138bc75d-0d04-0410-961f-82ee72b054a4
* * prims.cc (_Jv_RunMain): Use `using' to simplify code. Settromey2001-12-132-12/+11
| | | | | | | _Jv_Jar_Class_Path early. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47965 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (call): Synchronize if required.tromey2001-12-122-0/+16
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47949 138bc75d-0d04-0410-961f-82ee72b054a4
* * gij.cc (main): Clarify --help output.tromey2001-12-122-1/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47948 138bc75d-0d04-0410-961f-82ee72b054a4
* * gnu/gcj/runtime/StringBuffer.javatromey2001-12-122-1/+7
| | | | | | | | (ensureCapacity_unsynchronized): Ensure we always get at least `minimumCapacity' characters in new buffer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47940 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/String.java (String): New constructor.tromey2001-12-116-2/+253
| | | | | | | | | | | | * gnu/gcj/runtime/natStringBuffer.cc: New file. * gnu/gcj/runtime/StringBuffer.java: New file. * Makefile.in: Rebuilt. * Makefile.am (ordinary_java_source_files): Added gnu/gcj/runtime/StringBuffer.java. (nat_source_files): Added gnu/gcj/runtime/natStringBuffer.cc. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47883 138bc75d-0d04-0410-961f-82ee72b054a4
* For PR libgcj/1147:tromey2001-12-112-4/+18
| | | | | | | | * prims.cc (JvConvertArgv): Convert using current locale's encoding. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47862 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix for PR libgcj/5064.tromey2001-12-112-3/+12
| | | | | | | | * java/lang/natClassLoader.cc: Don't include stdio.h. (_Jv_RegisterClassHookDefault): Don't use snprintf. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47861 138bc75d-0d04-0410-961f-82ee72b054a4
* * gnu/gcj/xlib/XImage.java (toString): Add missing initialization.bothner2001-12-102-0/+13
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47834 138bc75d-0d04-0410-961f-82ee72b054a4
* * resolve.cc (_Jv_PrepareClass): Verify method here...tromey2001-12-104-39/+105
| | | | | | | | | | | | | | | | | | | | | | * defineclass.cc (handleMethodsEnd): ... not here. * verify.cc (_Jv_BytecodeVerifier::initialize_stack): New method. (_Jv_BytecodeVerifier::verify_instructions_0) [op_return]: Ensure there are no uninitialized objects. (_Jv_BytecodeVerifier::state::this_type): New field. (_Jv_BytecodeVerifier::state::state): Initialize this_type. (_Jv_BytecodeVerifier::state::copy): Copy this_type. (_Jv_BytecodeVerifier::state::merge): Merge this_type. (_Jv_BytecodeVerifier::state::check_no_uninitialized_objects): Handle this_type. (_Jv_BytecodeVerifier::state::check_this_initialized): New method. (_Jv_BytecodeVerifier::state::set_initialized): Handle this_type. (_Jv_BytecodeVerifier::state::set_this_type): New method. (_Jv_BytecodeVerifier::verify_instructions_0) [op_putfield]: Allow assignment to fields of `this' before another initializer is run. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47826 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Rebuilt.tromey2001-12-103-2/+7
| | | | | | | * Makefile.am (gnu/gcj/runtime/VMClassLoader.h): Use `::java'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47824 138bc75d-0d04-0410-961f-82ee72b054a4
* * libjava.lang/PR3731.out: Adjust output to reflect thatbryce2001-12-092-1/+5
| | | | | | | "instanceof" shouldn't trigger class initialization. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47822 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Rebuilt.tromey2001-12-096-36/+69
| | | | | | | | | | | | | | | | | * Makefile.am (java/lang/reflect/Method.h): ObjectInputStream now a friend. * java/lang/natClass.cc (getSignature): Only look at elements of non-null parameters. (getPrivateMethod): Removed old FIXME comment. * java/io/natObjectInputStream.cc (allocateObject): Removed old FIXME comment. (callConstructor): Simply use `NULL' for value of parameters. (ObjectClass): Removed. (ClassClass): Likewise. * java/io/ObjectInputStream.java (readObject): Fixed typo. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47800 138bc75d-0d04-0410-961f-82ee72b054a4
* * verify.cc (_Jv_BytecodeVerifier::is_assignable_from_slow):tromey2001-12-092-6/+13
| | | | | | | Handle case of array whose component type is not prepared. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47799 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/ClassLoader.java (defineClass): Rethrow anytromey2001-12-072-1/+4
| | | | | | | LinkageError. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47780 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/ThreadGroup.java (uncaughtException): Print message totromey2001-12-072-3/+7
| | | | | | | System.err. Required by spec. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47779 138bc75d-0d04-0410-961f-82ee72b054a4
* * verify.cc (_Jv_BytecodeVerifier::branch_prepass): Set start_PCtromey2001-12-072-3/+15
| | | | | | | | | earlier, for error handling. (_Jv_BytecodeVerifier::note_branch_target): Fixed branch target check. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47769 138bc75d-0d04-0410-961f-82ee72b054a4
* * verify.cc (_Jv_BytecodeVerifier::FLAG_JSR_TARGET): Removed.tromey2001-12-072-2/+3
| | | | | | | (_Jv_BytecodeVerifier::note_branch_target): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47745 138bc75d-0d04-0410-961f-82ee72b054a4
* * libjava.compile/BlankFinal.java: Removed; incorrect test.tromey2001-12-072-16/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47739 138bc75d-0d04-0410-961f-82ee72b054a4
* * verify.cc (_Jv_BytecodeVerifier::type_val): Addedtromey2001-12-062-19/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | unused_by_subroutine_type. (_Jv_BytecodeVerifier::type::merge): Handle unused_by_subroutine_type. (_Jv_BytecodeVerifier::state::state): Added `ret_semantics' argument. (_Jv_BytecodeVerifier::state::copy): Likewise. (_Jv_BytecodeVerifier::push_jump_merge): Pass `ret_semantics' to state constructor. (_Jv_BytecodeVerifier::state::is_unmerged_ret_state): New method. (_Jv_BytecodeVerifier::pop_jump): Don't accept a jump which is from an unmerged ret. (_Jv_BytecodeVerifier::verify_instructions_0): Don't let an unmerged ret state skip verification in the fall-through case. (debug_print): New function. (_Jv_BytecodeVerifier::type::print): New method. (_Jv_BytecodeVerifier::state::print): New method. (_Jv_BytecodeVerifier::push_jump_merge): Print state. (_Jv_BytecodeVerifier::verify_instructions_0): Likewise. (_Jv_BytecodeVerifier::get_variable): Don't call note_variable. (_Jv_BytecodeVerifier::_Jv_BytecodeVerifier): Print debug information. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47734 138bc75d-0d04-0410-961f-82ee72b054a4
* * defineclass.cc (character): Removed.tromey2001-12-052-17/+9
| | | | | | | | | (prepare_character): Removed. (is_identifier_start): Use Character, not character. (is_identifier_part): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47684 138bc75d-0d04-0410-961f-82ee72b054a4
* * verify.cc (_Jv_BytecodeVerifier::linked_utf8): New structure.tromey2001-12-042-4/+55
| | | | | | | | | | | | | | (_Jv_BytecodeVerifier::utf8_list): New field. (_Jv_BytecodeVerifier::_Jv_BytecodeVerifier): Initialize it. (_Jv_BytecodeVerifier::~_Jv_BytecodeVerifier): Free it. (_Jv_BytecodeVerifier::make_utf8_const): New method. (_Jv_BytecodeVerifier::get_one_type): Use it. (_Jv_BytecodeVerifier::type::merge): When using local semantics, if the destination type is already unsuitable then we didn't change. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47634 138bc75d-0d04-0410-961f-82ee72b054a4
* * defineclass.cc (read_one_method_attribute): `end_pc' for antromey2001-12-043-34/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | exception can be equal to code length. * verify.cc (_Jv_BytecodeVerifier::verify_instructions_0): Removed `start_PC' from error invocation where it didn't make sense, and updated error message. Use `copy' to copy a state. Only try to merge current state with saved state when we've fallen through from the previous instruction. (_Jv_BytecodeVerifier::pop_ref_or_return): New method. (_Jv_BytecodeVerifier::verify_instructions_0) [op_astore_0]: Use pop_ref_or_return. (_Jv_BytecodeVerifier::verify_instructions_0) [op_astore]: Likewise. (_Jv_BytecodeVerifier::push_jump_merge): Pass max_locals, not max_stack, to merge. (_Jv_BytecodeVerifier::verify_instructions_0): Likewise. (_Jv_BytecodeVerifier::push_jump_merge): Merge from new state into state at branch target, not vice versa. (_Jv_BytecodeVerifier::branch_prepass): Allow end of exception to be equal to code length. Removed redundant test to see if exception start is after exception end. (_Jv_BytecodeVerifier::verify_instructions_0): Type of argument to `finally' is Throwable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47623 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Rebuilt with automake-gcj.bryce2001-12-042-62/+1232
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47593 138bc75d-0d04-0410-961f-82ee72b054a4
* * defineclass.cc (handleMethodsEnd): Invoke verifier here...tromey2001-12-043-9/+20
| | | | | | | | | (handleCodeAttribute): ... not here. * verify.cc (_Jv_BytecodeVerifier::state::state): Use `copy', not structure assignment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47591 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.am (nat_files, x_nat_files): Make sure the dependenciesbryce2001-12-023-4/+12
| | | | | | | | don't get deleted if compilation fails. * Makefile.in: Rebuilt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47520 138bc75d-0d04-0410-961f-82ee72b054a4
* Remove ">>>"bryce2001-11-301-1/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47472 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.am (nat_headers, x_nat_headers): Depend on .class files, notbryce2001-11-305-1308/+126
| | | | | | | | | | | | | | libgcj.jar. (nat_files, x_nat_files): Build native files in subdirectories using the same dependency options as the java files. (gnu/gcj/runtime/FirstThread.h): Remove explicit rule and friend declarations. * configure.in: Put dependencies for .cc files in deps.mak. * Makefile.in: Rebuilt. * configure: Rebuilt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47471 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix for PR libgcj/2024, plus other class name cleanups:tromey2001-11-266-86/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | * include/jvm.h (_Jv_VerifyFieldSignature, _Jv_VerifyMethodSignature, _Jv_VerifyClassName, _Jv_VerifyIdentifier, _Jv_ClassNameSamePackage): Moved from ... * include/java-interp.h: ... here. * defineclass.cc (UTF8_PEEK): No longer conditional on interpreter. (_Jv_VerifyOne): Likewise. (_Jv_VerifyFieldSignature): Likewise. (_Jv_VerifyMethodSignature): Likewise. (is_identifier_start): Likewise. (is_identifier_part): Likewise. (_Jv_VerifyIdentifier): Likewise. (_Jv_VerifyClassName): Likewise. (_Jv_VerifyClassName): Likewise. (_Jv_ClassNameSamePackage): Likewise. (_Jv_VerifyClassName): Fail if class name is too long. * java/lang/natClassLoader.cc (_Jv_NewArrayClass): Disallow array of void. * java/lang/natClass.cc (forName): Check syntax of class name. Include IllegalArgumentException.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47334 138bc75d-0d04-0410-961f-82ee72b054a4
* * verify.cc (_Jv_BytecodeVerifier::branch_prepass): Usetromey2001-11-253-10/+19
| | | | | | | | | | | java_opcode as type for switch. [op_wide]: Likewise. (_Jv_BytecodeVerifier::verify_instructions_0): Likewise. [op_invokevirtual]: Likewise. * include/java-insns.h (java_opcode): Give enum a name. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47330 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix for PR libgcj/4583:tromey2001-11-252-8/+117
| | | | | | | | * java/math/BigDecimal.java (BigDecimal(double)): Rewrote. (BigDecimal(String)): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47329 138bc75d-0d04-0410-961f-82ee72b054a4
* * verify.cc (_Jv_BytecodeVerifier::branch_prepass) [op_iinc]:tromey2001-11-202-6/+15
| | | | | | | | | | | | | Uses two operand bytes, not one. [op_arraylength]: Has no operands in bytecode. (_Jv_BytecodeVerifier::push_jump): Fixed call to check_no_uninitialized_objects. (_Jv_BytecodeVerifier::push_exception_jump): Likewise. (_Jv_BytecodeVerifier::handle_ret_insn): Likewise. (_Jv_BytecodeVerifier::handle_jsr_insn): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47202 138bc75d-0d04-0410-961f-82ee72b054a4
* * verify.cc (_Jv_BytecodeVerifier::require_array_type): Specialtromey2001-11-202-3/+19
| | | | | | | | | | case for boolean arrays. * verify.cc (_Jv_BytecodeVerifier::compute_jump): Put PC into error message. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47190 138bc75d-0d04-0410-961f-82ee72b054a4
* * verify.cc (_Jv_BytecodeVerifier::verify_instructions_0)tromey2001-11-192-3/+12
| | | | | | | | [op_lshl, op_lshr, op_lushr]: Shift argument is an int, not a long. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47177 138bc75d-0d04-0410-961f-82ee72b054a4
* * verify.cc (type::to_array): New method.tromey2001-11-192-1/+22
| | | | | | | | (_Jv_BytecodeVerifier::verify_instructions_0) [op_anewarray]: Construct new array type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47165 138bc75d-0d04-0410-961f-82ee72b054a4
* * verify.cc (_Jv_BytecodeVerifier::branch_prepass) [op_sipush]:tromey2001-11-192-2/+6
| | | | | | | | Skip a short, not a byte. [op_newarray]: Skip a byte, not a short. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47163 138bc75d-0d04-0410-961f-82ee72b054a4
* * verify.cc (_Jv_BytecodeVerifier::get_type_val_for_signature):tromey2001-11-192-0/+6
| | | | | | | Added `B' case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47162 138bc75d-0d04-0410-961f-82ee72b054a4
* * verify.cc (_Jv_BytecodeVerifier::get_ushort): Use `jint' fortromey2001-11-192-10/+17
| | | | | | | | | | | temporary values. (_Jv_BytecodeVerifier::get_short): Likewise. (_Jv_BytecodeVerifier::get_int): Likewise. (_Jv_BytecodeVerifier::check_return_type): Reverse ordering of `compatible' call. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47161 138bc75d-0d04-0410-961f-82ee72b054a4
* * verify.cc (_Jv_BytecodeVerifier::pop_type): Put PC into errortromey2001-11-192-12/+25
| | | | | | | | | | | | | message. (_Jv_BytecodeVerifier::pop64): Likewise. (_Jv_BytecodeVerifier::pop32): Likewise. (_Jv_BytecodeVerifier::pop_raw): Likewise. (_Jv_BytecodeVerifier::pop_type): Promote the match type. (type::set_initialized): Only modify uninitialized types. (type::set_uninitialized): Fix shadowing bug. Simplify code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47158 138bc75d-0d04-0410-961f-82ee72b054a4
* * verify.cc: Include StringBuffer.h.tromey2001-11-182-41/+101
| | | | | | | | | | | | | | | | | | | | | | | (verify_fail): Added pc argument. Use StringBuffer to construct exception message. (_Jv_BytecodeVerifier::verify_instructions_0): Put PC into error message. (_Jv_BytecodeVerifier::check_return_type): Likewise. (_Jv_BytecodeVerifier::handle_field_or_method): Likewise. (_Jv_BytecodeVerifier::check_constant): Likewise. (_Jv_BytecodeVerifier::check_class_constant): Likewise. (_Jv_BytecodeVerifier::check_pool_index): Likewise. (_Jv_BytecodeVerifier::get_variable): Likewise. (_Jv_BytecodeVerifier::branch_prepass): Likewise. Also, correctly check exception handler endpoint. (_Jv_BytecodeVerifier::verify_instructions_0): Correctly handle wide arguments to current method. (_Jv_BytecodeVerifier::check_wide_constant): New method. (_Jv_BytecodeVerifier::verify_instructions_0) [op_ldc2_w]: Use it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47155 138bc75d-0d04-0410-961f-82ee72b054a4
* Obvious jni weak reference fixgreen2001-11-172-1/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47128 138bc75d-0d04-0410-961f-82ee72b054a4
* * verify.cc (_Jv_BytecodeVerifier::check_field_constant): Handletromey2001-11-162-1/+6
| | | | | | | case where field has primitive type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47112 138bc75d-0d04-0410-961f-82ee72b054a4
* * verify.cc (_Jv_BytecodeVerifier::is_assignable_from_slow): Newtromey2001-11-162-8/+63
| | | | | | | | | | | method. (type::compatible): Use it. (type::merge): Likewise. (type::promote): Return a `type&'. (get_one_type): Promote return value. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47097 138bc75d-0d04-0410-961f-82ee72b054a4
* Re-merge with Classpath, from Brian Jones:tromey2001-11-162-1/+12
| | | | | | | | | | * java/lang/Integer.java (getInteger): Attempt to decode the value of the system property instead of the name of the system property. (parseInt): Throw NumberFormatException explicitly in the case of a null argument in keeping with JDK 1.3. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47095 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/util/Timer.java (TaskQueue.isStopped): Remove method.mark2001-11-162-11/+16
| | | | | | | | (Scheduler.run): Try to re-schedule task and ignore exception if queue has been stopped. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47093 138bc75d-0d04-0410-961f-82ee72b054a4
* * verify.cc (type::compatible): Use _Jv_IsAssignableFrom.tromey2001-11-162-2/+11
| | | | | | | (type::merge): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47077 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/natString.cc: correct argument order forhboehm2001-11-152-1/+6
| | | | | | | _Jv_AllocPtrFreeObj git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47035 138bc75d-0d04-0410-961f-82ee72b054a4
* * verify.cc (class _Jv_BytecodeVerifier) [op_dup2]: Fixed logic.tromey2001-11-152-18/+78
| | | | | | | | | | | | [op_dup_x2]: Likewise. [op_dup2_x1]: Likewise. [op_dup2_x2]: Likewise. (branch_prepass): Added `op_newarray' case. Updated unrecognized instruction error. (verify_instructions_0): Updated unrecognized instruction error. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47033 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/reflect/Constructor.java (toString): Use moretromey2001-11-142-1/+4
| | | | | | | efficient form of Modifier.toString(). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47031 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud