aboutsummaryrefslogtreecommitdiff
path: root/libjava
AgeCommit message (Collapse)AuthorFilesLines
2001-12-14For PR libgcj/5103:Tom Tromey5-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. From-SVN: r48012
2001-12-14prims.cc: Some old cleanups.Hans Boehm5-37/+79
* libjava/prims.cc: Some old cleanups. The collector now 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. From-SVN: r48002
2001-12-13prims.cc (_Jv_RunMain): Use `using' to simplify code.Tom Tromey2-12/+11
* prims.cc (_Jv_RunMain): Use `using' to simplify code. Set _Jv_Jar_Class_Path early. From-SVN: r47965
2001-12-12* jni.cc (call): Synchronize if required.Tom Tromey2-0/+16
From-SVN: r47949
2001-12-12* gij.cc (main): Clarify --help output.Tom Tromey2-1/+3
From-SVN: r47948
2001-12-12* gnu/gcj/runtime/StringBuffer.javaTom Tromey2-1/+7
(ensureCapacity_unsynchronized): Ensure we always get at least `minimumCapacity' characters in new buffer. From-SVN: r47940
2001-12-11String.java (String): New constructor.Tom Tromey6-2/+253
* java/lang/String.java (String): New constructor. * 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. From-SVN: r47883
2001-12-11For PR libgcj/1147:Tom Tromey2-4/+18
* prims.cc (JvConvertArgv): Convert using current locale's encoding. From-SVN: r47862
2001-12-11re PR libgcj/5064 (java/lang/natClassLoader.cc doesn't compile on systems ↵Tom Tromey2-3/+12
without snprintf) Fix for PR libgcj/5064. * java/lang/natClassLoader.cc: Don't include stdio.h. (_Jv_RegisterClassHookDefault): Don't use snprintf. From-SVN: r47861
2001-12-09* gnu/gcj/xlib/XImage.java (toString): Add missing initialization.Per Bothner2-0/+13
From-SVN: r47834
2001-12-10resolve.cc (_Jv_PrepareClass): Verify method here...Tom Tromey4-39/+105
* resolve.cc (_Jv_PrepareClass): Verify method here... * 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. From-SVN: r47826
2001-12-10Makefile.in: Rebuilt.Tom Tromey3-2/+7
* Makefile.in: Rebuilt. * Makefile.am (gnu/gcj/runtime/VMClassLoader.h): Use `::java'. From-SVN: r47824
2001-12-09re PR java/3731 (gcj should generate class init code for instanceof)Bryce McKinlay2-1/+5
* libjava.lang/PR3731.out: Adjust output to reflect that "instanceof" shouldn't trigger class initialization. From-SVN: r47822
2001-12-09Makefile.in: Rebuilt.Tom Tromey6-36/+69
* Makefile.in: Rebuilt. * 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. From-SVN: r47800
2001-12-09verify.cc (_Jv_BytecodeVerifier::is_assignable_from_slow): Handle case of ↵Tom Tromey2-6/+13
array whose component type is not prepared. * verify.cc (_Jv_BytecodeVerifier::is_assignable_from_slow): Handle case of array whose component type is not prepared. From-SVN: r47799
2001-12-07ClassLoader.java (defineClass): Rethrow any LinkageError.Tom Tromey2-1/+4
* java/lang/ClassLoader.java (defineClass): Rethrow any LinkageError. From-SVN: r47780
2001-12-07ThreadGroup.java (uncaughtException): Print message to System.err.Tom Tromey2-3/+7
* java/lang/ThreadGroup.java (uncaughtException): Print message to System.err. Required by spec. From-SVN: r47779
2001-12-07verify.cc (_Jv_BytecodeVerifier::branch_prepass): Set start_PC earlier, for ↵Tom Tromey2-3/+15
error handling. * verify.cc (_Jv_BytecodeVerifier::branch_prepass): Set start_PC earlier, for error handling. (_Jv_BytecodeVerifier::note_branch_target): Fixed branch target check. From-SVN: r47769
2001-12-07verify.cc (_Jv_BytecodeVerifier::FLAG_JSR_TARGET): Removed.Tom Tromey2-2/+3
* verify.cc (_Jv_BytecodeVerifier::FLAG_JSR_TARGET): Removed. (_Jv_BytecodeVerifier::note_branch_target): Likewise. From-SVN: r47745
2001-12-07* libjava.compile/BlankFinal.java: Removed; incorrect test.Tom Tromey2-16/+4
From-SVN: r47739
2001-12-06verify.cc (_Jv_BytecodeVerifier::type_val): Added unused_by_subroutine_type.Tom Tromey2-19/+207
* verify.cc (_Jv_BytecodeVerifier::type_val): Added 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. From-SVN: r47734
2001-12-05defineclass.cc (character): Removed.Tom Tromey2-17/+9
* defineclass.cc (character): Removed. (prepare_character): Removed. (is_identifier_start): Use Character, not character. (is_identifier_part): Likewise. From-SVN: r47684
2001-12-04verify.cc (_Jv_BytecodeVerifier::linked_utf8): New structure.Tom Tromey2-4/+55
* verify.cc (_Jv_BytecodeVerifier::linked_utf8): New structure. (_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. From-SVN: r47634
2001-12-04defineclass.cc (read_one_method_attribute): `end_pc' for an exception can be ↵Tom Tromey3-34/+83
equal to code length. * defineclass.cc (read_one_method_attribute): `end_pc' for an 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. From-SVN: r47623
2001-12-04* Makefile.in: Rebuilt with automake-gcj.Bryce McKinlay2-62/+1232
From-SVN: r47593
2001-12-04defineclass.cc (handleMethodsEnd): Invoke verifier here...Tom Tromey3-9/+20
* defineclass.cc (handleMethodsEnd): Invoke verifier here... (handleCodeAttribute): ... not here. * verify.cc (_Jv_BytecodeVerifier::state::state): Use `copy', not structure assignment. From-SVN: r47591
2001-12-02Makefile.am (nat_files, [...]): Make sure the dependencies don't get deleted ↵Bryce McKinlay3-4/+12
if compilation fails. * Makefile.am (nat_files, x_nat_files): Make sure the dependencies don't get deleted if compilation fails. * Makefile.in: Rebuilt. From-SVN: r47520
2001-11-30Remove ">>>"Bryce McKinlay1-1/+0
From-SVN: r47472
2001-11-30Makefile.am (nat_headers, [...]): Depend on .class files, not libgcj.jar.Bryce McKinlay5-1308/+126
* Makefile.am (nat_headers, x_nat_headers): Depend on .class files, not 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. From-SVN: r47471
2001-11-26Fix for PR libgcj/2024, plus other class name cleanups:Tom Tromey6-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. From-SVN: r47334
2001-11-25verify.cc (_Jv_BytecodeVerifier::branch_prepass): Use java_opcode as type ↵Tom Tromey3-10/+19
for switch. * verify.cc (_Jv_BytecodeVerifier::branch_prepass): Use 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. From-SVN: r47330
2001-11-25re PR libgcj/4583 (problems BigDecimal(double) ctor.)Tom Tromey2-8/+117
Fix for PR libgcj/4583: * java/math/BigDecimal.java (BigDecimal(double)): Rewrote. (BigDecimal(String)): Likewise. From-SVN: r47329
2001-11-20verify.cc (_Jv_BytecodeVerifier::branch_prepass): Uses two operand bytes, ↵Tom Tromey2-6/+15
not one. * verify.cc (_Jv_BytecodeVerifier::branch_prepass) [op_iinc]: 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. From-SVN: r47202
2001-11-20verify.cc (_Jv_BytecodeVerifier::require_array_type): Special case for ↵Tom Tromey2-3/+19
boolean arrays. * verify.cc (_Jv_BytecodeVerifier::require_array_type): Special case for boolean arrays. * verify.cc (_Jv_BytecodeVerifier::compute_jump): Put PC into error message. From-SVN: r47190
2001-11-19verify.cc (_Jv_BytecodeVerifier::verify_instructions_0): Shift argument is ↵Tom Tromey2-3/+12
an int, not a long. * verify.cc (_Jv_BytecodeVerifier::verify_instructions_0) [op_lshl, op_lshr, op_lushr]: Shift argument is an int, not a long. From-SVN: r47177
2001-11-19verify.cc (type::to_array): New method.Tom Tromey2-1/+22
* verify.cc (type::to_array): New method. (_Jv_BytecodeVerifier::verify_instructions_0) [op_anewarray]: Construct new array type. From-SVN: r47165
2001-11-19verify.cc (_Jv_BytecodeVerifier::branch_prepass): Skip a short, not a byte.Tom Tromey2-2/+6
* verify.cc (_Jv_BytecodeVerifier::branch_prepass) [op_sipush]: Skip a short, not a byte. [op_newarray]: Skip a byte, not a short. From-SVN: r47163
2001-11-19verify.cc (_Jv_BytecodeVerifier::get_type_val_for_signature): Added `B' case.Tom Tromey2-0/+6
* verify.cc (_Jv_BytecodeVerifier::get_type_val_for_signature): Added `B' case. From-SVN: r47162
2001-11-19verify.cc (_Jv_BytecodeVerifier::get_ushort): Use `jint' for temporary values.Tom Tromey2-10/+17
* verify.cc (_Jv_BytecodeVerifier::get_ushort): Use `jint' for temporary values. (_Jv_BytecodeVerifier::get_short): Likewise. (_Jv_BytecodeVerifier::get_int): Likewise. (_Jv_BytecodeVerifier::check_return_type): Reverse ordering of `compatible' call. From-SVN: r47161
2001-11-19verify.cc (_Jv_BytecodeVerifier::pop_type): Put PC into error message.Tom Tromey2-12/+25
* verify.cc (_Jv_BytecodeVerifier::pop_type): Put PC into error 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. From-SVN: r47158
2001-11-18verify.cc: Include StringBuffer.h.Tom Tromey2-41/+101
* verify.cc: Include StringBuffer.h. (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. From-SVN: r47155
2001-11-17Obvious jni weak reference fixAnthony Green2-1/+5
From-SVN: r47128
2001-11-16verify.cc (_Jv_BytecodeVerifier::check_field_constant): Handle case where ↵Tom Tromey2-1/+6
field has primitive type. * verify.cc (_Jv_BytecodeVerifier::check_field_constant): Handle case where field has primitive type. From-SVN: r47112
2001-11-16verify.cc (_Jv_BytecodeVerifier::is_assignable_from_slow): New method.Tom Tromey2-8/+63
* verify.cc (_Jv_BytecodeVerifier::is_assignable_from_slow): New method. (type::compatible): Use it. (type::merge): Likewise. (type::promote): Return a `type&'. (get_one_type): Promote return value. From-SVN: r47097
2001-11-16Re-merge with Classpath, from Brian Jones:Tom Tromey2-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. From-SVN: r47095
2001-11-16Timer.java (TaskQueue.isStopped): Remove method.Mark Wielaard2-11/+16
* java/util/Timer.java (TaskQueue.isStopped): Remove method. (Scheduler.run): Try to re-schedule task and ignore exception if queue has been stopped. From-SVN: r47093
2001-11-16verify.cc (type::compatible): Use _Jv_IsAssignableFrom.Tom Tromey2-2/+11
* verify.cc (type::compatible): Use _Jv_IsAssignableFrom. (type::merge): Likewise. From-SVN: r47077
2001-11-15natString.cc: correct argument order for _Jv_AllocPtrFreeObjHans Boehm2-1/+6
* java/lang/natString.cc: correct argument order for _Jv_AllocPtrFreeObj From-SVN: r47035
2001-11-15verify.cc (class _Jv_BytecodeVerifier): Fixed logic.Tom Tromey2-18/+78
* verify.cc (class _Jv_BytecodeVerifier) [op_dup2]: Fixed logic. [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. From-SVN: r47033
2001-11-14Constructor.java (toString): Use more efficient form of Modifier.toString().Tom Tromey2-1/+4
* java/lang/reflect/Constructor.java (toString): Use more efficient form of Modifier.toString(). From-SVN: r47031