aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/lang
AgeCommit message (Collapse)AuthorFilesLines
2001-09-24PosixProcess.java (exitValue): Implement here.Bryce McKinlay2-28/+19
* java/lang/PosixProcess.java (exitValue): Implement here. Throw IllegalThreadStateException if process hasn't exited yet. * java/lang/natPosixProcess.cc (exitValue): Removed. (waitFor): Only check thread interrupted status if waitpid() returned an error. Use WIFEXITED and WEXITSTATUS to process process's exit value. From-SVN: r45766
2001-09-21jvm.h (_Jv_VTable): Handle function descriptors for ia64...Richard Henderson1-8/+5
* include/jvm.h (_Jv_VTable): Handle function descriptors for ia64; add get_method, set_method, vtable_elt_size, new_vtable. (_Jv_ArrayVTable): Derive from _Jv_VTable. * resolve.cc (_Jv_PrepareClass): Use new _Jv_VTable methods. * interpret.cc (_Jv_InterpMethod::continue1): Likewise. * java/lang/natClassLoader.cc (_Jv_NewArrayClass): Likewise. From-SVN: r45734
2001-09-21no-threads.cc (_Jv_ThreadStart): Remove names of unused arguments.Richard Henderson1-1/+1
* no-threads.cc (_Jv_ThreadStart): Remove names of unused arguments. * java/lang/mprec.c (lo0bits): Fix paren typo. From-SVN: r45724
2001-09-14CloneNotSupportedException.java: Re-merged with Classpath.Tom Tromey1-16/+22
* java/lang/CloneNotSupportedException.java: Re-merged with Classpath. From-SVN: r45599
2001-09-05From Eric Blake, via Classpath:Tom Tromey1-6/+37
* java/lang/String.java (CaseInsensitiveComparator): New class. (CASE_INSENSITIVE_ORDER): Use instance of CaseInsensitiveComparator. From-SVN: r45425
2001-09-05natClassLoader.cc: Include VirtualMachineError.hCorey Minyard1-0/+17
2001-09-05 Corey Minyard <minyard@acm.org> Tom Tromey <tromey@redhat.com> * java/lang/natClassLoader.cc: Include VirtualMachineError.h (_Jv_RegisterClassHookDefault): Throw error if a class is registered twice. Co-Authored-By: Tom Tromey <tromey@redhat.com> From-SVN: r45418
2001-09-05natSystem.cc (init_properties): Default locale is en_US, not just en.Tom Tromey1-0/+1
* java/lang/natSystem.cc (init_properties): Default locale is en_US, not just en. From-SVN: r45417
2001-09-04re PR libgcj/4208 (Problem using 'null' with Java reflection)Tom Tromey1-2/+3
* java/lang/reflect/natField.cc (set): Allow for case when the value is null. Fixes PR libgcj/4208. From-SVN: r45367
2001-09-02javaprims.h: Regenerated class list.Tom Tromey2-4/+4
* gcj/javaprims.h: Regenerated class list. * java/lang/IllegalThreadStateException.java, java/lang/InstantiationException.java: Minor comment tweaks to satisfy libgcj `classes.pl' script. From-SVN: r45354
2001-09-02Makefile.in: Rebuilt.Tom Tromey48-1214/+3402
* Makefile.in: Rebuilt. * Makefile.am (core_java_source_files): Added UnsupportedClassVersionError. * java/lang/UnsupportedClassVersionError.java: New file from Classpath. * java/io/CharConversionException.java, java/io/EOFException.java, java/io/FileNotFoundException.java, java/io/IOException.java, java/io/InterruptedIOException.java, java/io/ObjectStreamException.java, java/io/OptionalDataException.java, java/io/StreamCorruptedException.java, java/io/SyncFailedException.java, java/io/UTFDataFormatException.java, java/io/UnsupportedEncodingException.java, java/lang/AbstractMethodError.java, java/lang/ArithmeticException.java, java/lang/ArrayIndexOutOfBoundsException.java, java/lang/ArrayStoreException.java, java/lang/ClassCastException.java, java/lang/ClassCircularityError.java, java/lang/ClassFormatError.java, java/lang/CloneNotSupportedException.java, java/lang/Error.java, java/lang/Exception.java, java/lang/ExceptionInInitializerError.java, java/lang/IllegalAccessError.java, java/lang/IllegalAccessException.java, java/lang/IllegalArgumentException.java, java/lang/IllegalMonitorStateException.java, java/lang/IllegalStateException.java, java/lang/IllegalThreadStateException.java, java/lang/IncompatibleClassChangeError.java, java/lang/IndexOutOfBoundsException.java, java/lang/InstantiationError.java, java/lang/InstantiationException.java, java/lang/InternalError.java, java/lang/InterruptedException.java, java/lang/LinkageError.java, java/lang/NegativeArraySizeException.java, java/lang/NoClassDefFoundError.java, java/lang/NoSuchFieldError.java, java/lang/NoSuchFieldException.java, java/lang/NoSuchMethodError.java, java/lang/NoSuchMethodException.java, java/lang/NullPointerException.java, java/lang/NumberFormatException.java, java/lang/OutOfMemoryError.java, java/lang/RuntimeException.java, java/lang/SecurityException.java, java/lang/StackOverflowError.java, java/lang/StringIndexOutOfBoundsException.java, java/lang/ThreadDeath.java, java/lang/UnknownError.java, java/lang/UnsatisfiedLinkError.java, java/lang/UnsupportedOperationException.java, java/lang/VerifyError.java, java/lang/VirtualMachineError.java, java/lang/reflect/InvocationTargetException.java, java/net/BindException.java, java/net/ConnectException.java, java/net/MalformedURLException.java, java/net/NoRouteToHostException.java, java/net/ProtocolException.java, java/net/SocketException.java, java/net/UnknownHostException.java, java/net/UnknownServiceException.java, java/text/ParseException.java: Copied from Classpath, thanks to Mark Wielaard who did the merge. * java/lang/System.java (getProperty): Use single argument form of SecurityManager.checkPropertyAccess. * Makefile.in: Rebuilt. * Makefile.am (core_java_source_files): Added VMSecurityManager. * java/lang/VMSecurityManager.java: New file. * java/lang/SecurityManager.java: Merged with Classpath. From-SVN: r45353
2001-08-31javaprims.h (_Jv_RegisterClassHook): New extern declaration.Per Bothner2-3/+18
* gcj/javaprims.h (_Jv_RegisterClassHook): New extern declaration. (_Jv_RegisterClassHookDefault): Likewise. * java/lang/Class.h (_Jv_RegisterClassHookDefault): Declare as friend. * java/lang/natClassLoader.cc (_Jv_RegisterClassHook): New variable. (_Jv_RegisterClassHookDefault): New.function. (_Jv_RegisterClasses): Call _Jv_RegisterClassHook. From-SVN: r45344
2001-08-31ClassLoader.java (system): Remove static field.Per Bothner2-12/+5
* java/lang/ClassLoader.java (system): Remove static field. (getSystemClassLoader): Get gnu.gcj.runtime.VMClassLoader.instance directly instead of using it to set the system field. (loadClass): Use VMClassLoader.instance instead of system field. (findSystemClass): Similar. * prims.cc (_Jv_RunMain): Clear VMClassLoader::instance rather than ClassLoader::system which no longer exists. * java/lang/natClassLoader.java (_Jv_FindClass): Simplify. From-SVN: r45343
2001-08-26Makefile.am: New friends for java/lang/Thread.h.Bryce McKinlay2-17/+36
* Makefile.am: New friends for java/lang/Thread.h. * prims.cc (runFirst): Removed. (JvRunMain): Merged into _Jv_RunMain. Now just calls that. (_Jv_RunMain): Now takes either a klass or class name parameter. Create a gnu.gcj.runtime.FirstThread and attach the native thread to that, then run it using _Jv_ThreadRun. Remove special handling of jar files, instead pass is_jar parameter through to FirstThread. * gcj/javaprims.h: Add prototypes for _Jv_ThreadRun and new variant of _Jv_AttachCurrentThread. * gnu/gcj/runtime/FirstThread.java (FirstThread): Now extends Thread. (run): New method. Take care of looking up main class manifest attribute and calling forName if neccessary. Then call call_main. (call_main): New native method. * gnu/gcj/runtime/natFirstThread.cc (call_main): New function, code relocated from prims.cc. Look up and call main method. * java/lang/Thread.java (run_): Removed. * java/lang/natThread.cc (run_): Renamed to... (_Jv_ThreadRun): this. JVMPI notification code moved to ... (_Jv_NotifyThreadStart): here. New function. (countStackFrames, destroy, resume, suspend, stop): Throw UnsupportedOperationExceptions rather than JvFail'ing. (_Jv_AttachCurrentThread): New variant takes a Thread argument. Existing version wraps new variant. From-SVN: r45182
2001-08-24Field.java (toString): Use Method.appendClassName.Tom Tromey5-76/+113
* java/lang/reflect/Field.java (toString): Use Method.appendClassName. * java/lang/reflect/Constructor.java (toString): Use Method.appendClassName. * java/lang/reflect/Method.java: Reindented. (appendClassName): New method. (toString): Use it. * defineclass.cc (handleMethod ): Initialize `throws' field of method. (read_one_method_attribute): Handle Exceptions attribute. * java/lang/reflect/natMethod.cc (ClassClass): Removed. (ObjectClass): Removed. (getType): Compute `exception_types'. * java/lang/Class.h (struct _Jv_Method): Added `throws' field. From-SVN: r45153
2001-08-22Look for lib-gnu-pkg-quux.so, not gnu-pkg-quux.so.Anthony Green1-5/+7
From-SVN: r45115
2001-08-10* java/lang/natObject.cc (is_mp): Protect use of _SC_NPROCESSORS_ONLN.Loren J. Rittle1-0/+4
From-SVN: r44771
2001-07-30natIconv.cc (done): New methods.Tom Tromey1-0/+2
2001-07-30 Tom Tromey <tromey@redhat.com> Corey Minyard <minyard@acm.org> * gnu/gcj/convert/natIconv.cc (done): New methods. * gnu/gcj/convert/Output_iconv.java (done): New method. * gnu/gcj/convert/Input_iconv.java (done): New method. * gnu/gcj/convert/UnicodeToBytes.java (defaultEncodingClass): Removed. (getDefaultEncodingClass): Removed. (getDefaultEncoder): Use getEncoder. (done): New method. (defaultEncoding, CACHE_SIZE, encoderCache, currCachePos): New static fields. * gnu/gcj/convert/BytesToUnicode.java (defaultDecodingClass): Removed. (defaultEncoding, CACHE_SIZE, decoderCache, currCachePos): New static fields. (getDefaultDecodingClass): Removed. (getDefaultDecoder): Use getDecoder. (getDecoder): Look up decoder in cache. (done): New method. * java/lang/natString.cc (init): Call `done' on converter. (getBytes): Likewise. Co-Authored-By: Corey Minyard <minyard@acm.org> From-SVN: r44484
2001-07-30* java/lang/Integer.java: Merged with Classpath.Tom Tromey1-4/+2
From-SVN: r44478
2001-07-24VMClassLoader.java (getPrimitiveClass): Return correct type.Tom Tromey1-8/+8
* java/lang/VMClassLoader.java (getPrimitiveClass): Return correct type. From-SVN: r44296
2001-07-23javaprims.h: Rebuilt class list.Tom Tromey7-647/+1640
* gcj/javaprims.h: Rebuilt class list. * Makefile.in: Rebuilt. * Makefile.am (core_java_source_files): Added VMClassLoader. * java/lang/VMClassLoader.java: New file. * java/lang/Boolean.java: Merged with Classpath. * java/lang/Byte.java: Merged with Classpath. * java/lang/Integer.java: Merged with Classpath. * java/lang/Long.java: Merged with Classpath. * java/lang/Number.java: Merged with Classpath. * java/lang/Short.java: Merged with Classpath. From-SVN: r44274
2001-07-23configure.host: Enable hash synchronization for alpha*-*.Jeff Sturm1-0/+38
* configure.host: Enable hash synchronization for alpha*-*. * include/posix-threads.h (_Jv_ThreadSelf): Added inline function for alpha. * java/lang/natObject.cc (compare_and_swap, release_set, compare_and_swap_release): Added inline functions for alpha. From-SVN: r44251
2001-07-10Makefile.am: Added `java/lang/ThreadLocal.java'.Alexandre Petit-Bianco1-0/+165
libjava: 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com> * Makefile.am: Added `java/lang/ThreadLocal.java'. * Makefile.in: Regenerate. * java/lang/ThreadLocal.java: Initial import. libjava/testsuite: 2001-07-10 Alexandre Petit-Bianco <apbianco@readhat.com> * libjava.lang/TLtest.java: New file. * libjava.lang/TLtest.out: New file. (http://gcc.gnu.org/ml/java-patches/2001-q3/msg00042.html ) From-SVN: r43915
2001-07-05For PR java/3562:Tom Tromey1-2/+2
* java/lang/Class.h (Class(void)): Now private. Removed implementation. From dmorsberger@sensysdl.com. From-SVN: r43781
2001-06-15natRuntime.cc (_Jv_FindSymbolInExecutable): Return NULL if no library on the ↵Tom Tromey1-1/+4
list has the symbol. * java/lang/natRuntime.cc (_Jv_FindSymbolInExecutable): Return NULL if no library on the list has the symbol. (init): Call add_library on the program itself. * prims.cc (JvRunMain): Initialize Runtime before searching for `main'. (_Jv_RunMain): Likewise. From-SVN: r43413
2001-06-08re PR libgcj/3059 (System doesn't set java.home property)Tom Tromey1-2/+5
Fix for PR libgcj/3059: * java/lang/natSystem.cc (init_properties): Define `java.home'. * Makefile.in: Rebuilt. * Makefile.am (AM_CXXFLAGS): Define PREFIX. From-SVN: r43040
2001-06-05natClass.cc (_Jv_IsAssignableFrom): Ensure that ancestors table index is ↵Martin Kahlert1-6/+16
within allowed bounds. 2001-06-05 Martin Kahlert <martin.kahlert@infineon.com> Bryce McKinlay <bryce@waitaki.otago.ac.nz> * java/lang/natClass.cc (_Jv_IsAssignableFrom): Ensure that ancestors table index is within allowed bounds. Ensure that we dont try to access class itable at a negative offset. Avoid an ancestor table lookup if source is a primitive type class. (isInstance): Remove redundant isPrimitive() check. Co-Authored-By: Bryce McKinlay <bryce@waitaki.otago.ac.nz> From-SVN: r42898
2001-06-02!defined(USE_LTDL) fixAnthony Green1-0/+8
From-SVN: r42813
2001-06-02USE_LIBFFI changeAnthony Green1-0/+11
From-SVN: r42791
2001-05-24natString.cc (init): Throw ArrayIndexOutOfBoundsException.Tom Tromey1-8/+10
* java/lang/natString.cc (init): Throw ArrayIndexOutOfBoundsException. (getChars): Likewise. (getBytes): Likewise. (valueOf): Likewise. From-SVN: r42531
2001-05-24configure.in: Only allow hash synchronization when POSIX threads are enabled.Tom Tromey1-1/+1
* configure.in: Only allow hash synchronization when POSIX threads are enabled. * java/lang/natObject.cc (alloc_heavy): Properly find `init' field of sync info object. From-SVN: r42530
2001-05-24[multiple changes]Tom Tromey4-22/+963
2001-05-23 Tom Tromey <tromey@redhat.com> * posix-threads.cc (_Jv_self_cache): Renamed from self_cache. * gcj/Makefile.in: Rebuilt. * gcj/Makefile.am (gcj_HEADERS): Added libgcj-config.h. * gcj/javaprims.h: Include gcj/libgcj-config.h. * gcj/libgcj-config.h.in: New file. * libgcj.spec.in (*jc1): Added @HASH_SYNC_SPEC@. * configure: Rebuilt. * configure.in: Enable hash synchronization by default on some platforms. (HASH_SYNC_SPEC): New subst. (AC_CONFIG_HEADER): Added gcj/libgcj-config.h. Correctly use `test -z' instead of `test -n' in a couple places. (JV_HASH_SYNCHRONIZATION): Use AC_DEFINE; don't add to LIBGCJ_CXXFLAGS. * configure.host (enable_java_net_default): Initialize. (enable_hash_synchronization_default): New variable. 2001-05-23 Hans Boehm <Hans_Boehm@hp.com> * boehm.cc (_Jv_MarkObj): Don't mark sync_info when hash synchronization in use. (_Jv_MarkArray): Likewise. (_Jv_AllocBytes): Don't check return result. (handle_out_of_memory): New function. (_Jv_InitGC): Set GC_oom_fn. (trace_one_vtable): New global. (_Jv_AllocTraceOne): New function. * configure.in: Added --enable-hash-synchronization. * defineclass.cc, prims.cc, resolve.cc, java/lang/natString.cc, java/net/natInetAddress.cc: Remove _Jv_AllocBytesChecked. * nogc.cc (_Jv_AllocObj): Throw out-of-memory. (_Jv_AllocArray): Likewise. (_Jv_AllocBytes): Likewise. (_Jv_AllocPtrFreeObject): New function. (_Jv_AllocTraceOne): Likewise. * posix-threads.cc (_Jv_ThreadRegister): Handle slow pthread_self(). (self_cache): New global. (_Jv_ThreadSelf_out_of_line): New function. * prims.cc (_Jv_AllocBytesChecked): Removed. (_Jv_ThrowNoMemory): New function. (_Jv_AllocObject): Don't check for null return from allocator. (_Jv_NewObjectArray): Likewise. (_Jv_AllocPtrFreeObject): New function. (_Jv_NewPrimArray): Allocate pointer-free object if possible. * include/javaprims.h (_Jv_AllocPtrFreeObject): Declare. (_Jv_MonitorEnter, _Jv_MonitorExit): Don't return value. * include/boehm-gc.h (_Jv_AllocObj): Define. (_Jv_AllocPtrFreeObj): Define. * include/jvm.h (_Jv_AllocPtrFreeObj): Declare. (_Jv_ThrowNoMemory): Declare. (_Jv_AllocTraceOne): Declare. (_Jv_AllocBytesChecked): Removed. * include/posix-threads.h (_Jv_MutexInit, _Jv_MutexLock, _Jv_MutexUnlock): Handle LOCK_DEBUG. (_Jv_ThreadSelf): Handle case where system pthread_self() is slow. * java/lang/Class.h (Class): Declare _Jv_AllocPtrFreeObj as friend. * java/lang/Object.h (sync_info): Conditional upon presence of hash synchronization. * java/lang/natObject.cc: Much new code to handle thin locks and hash synchronization. * java/lang/natString.cc (_Jv_AllocString): Allocate pointer-free object if possible. From-SVN: r42519
2001-05-21Implement invocation interface; don't create new thread for main.Per Bothner2-26/+78
From-SVN: r42428
2001-05-21javaprims.h (_Jv_FormatInt): New declaration.Per Bothner6-38/+80
* gcj/javaprims.h (_Jv_FormatInt): New declaration. * java/lang/natString.cc (_JvFormatInt): New primitive, with logic taken from old Integer.toString code. (Integer::valueOf): Use _Jv_FormatInt. * java/lang/Integer.java (toString): Just use call String.valueOf. * java/lang/Long.java (toString): Fix typo in comment. * java/lang/String.java (valueOf(int)): Make native. * java/lang/StringBuffer.java (append(int)): Make native. * java/lang/natStringBuffer.cc: New file, for append(jint). * Makefile.am (ant_source_files): Add java/lang/natStringBuffer.cc. From-SVN: r42419
2001-05-18[multiple changes]Bryce McKinlay1-4/+3
2001-05-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * include/jvm.h: Move "#pragma GCC java_exceptions" to ... * gcj/javaprims.h: ... here. * gnu/gcj/io/shs.cc: Add "#pragma GCC java_exceptions". 2001-05-17 Martin Kahlert <martin.kahlert@infineon.com> * java/lang/natClass.cc (_Jv_FindIIndex): Fix an off by one error with length of ioffset table. (_Jv_IsAssignableFrom): Likewise. From-SVN: r42248
2001-05-11configure.in (ia64-*): Don't set SYSDEP_SOURCES.Richard Henderson1-9/+1
* configure.in (ia64-*): Don't set SYSDEP_SOURCES. * java/lang/natThrowable.cc: Don't use __ia64_backtrace. From-SVN: r41984
2001-05-06Class.h (_Jv_Self): New union type.Bryce McKinlay2-7/+9
* java/lang/Class.h (_Jv_Self): New union type. (Class): Manipulate vtable pointer via _Jv_Self union. Thanks to Jeff Sturm and Fergus Henderson. * java/lang/ClassLoader.java: Remove dead code fragment. From-SVN: r41876
2001-04-28* java/lang/natClassLoader.cc (_Jv_RegisterInitiatingLoader): Use _Jv_Malloc.Zack Weinberg1-2/+2
From-SVN: r41651
2001-04-25decl.c (init_decl_processing): Add new class "protectionDomain" field.Bryce McKinlay6-46/+561
gcc/java: 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * decl.c (init_decl_processing): Add new class "protectionDomain" field. * class.c (make_class_data): Set initial value for "protectionDomain". libjava: 2001-04-25 Bryce McKinlay <bryce@albatross.co.nz> java.security merge and ClassLoader compliance fixes. * java/lang/Class.h (Class): Include ProtectionDomain.h. New protectionDomain field. (forName): Add initialize parameter. Fixes declaration to comply with JDK spec. * java/lang/natClass.cc (forName): Correct declaration of the three-arg variant. Honour "initialize" flag. (getProtectionDomain0): New method. * java/lang/Class.java: Fix forName() declaration. (getPackage): New method based on Classpath implementation. (getProtectionDomain0): New native method decl. (getProtectionDomain): New method. * java/lang/ClassLoader.java (getParent): Now final. (definedPackages): New field. (getPackage): New. (defineClass): New variant with protectionDomain argument. (definePackage): New. (getPackages): New. (findSystemClass): Now final. (getSystemResourceAsStream): Remove redundant "final" modifier. (getSystemResource): Remove redundant "final" modifier. (getResources): Now final. (protectionDomainPermission): New static field. (unknownProtectionDomain): Ditto. (defaultProtectionDomain): Ditto. (getSystemClassLoader): Now non-native. * java/util/ResourceBundle.java (tryGetSomeBundle): Use the correct arguments for Class.forName(). * java/lang/Package.java: New file. * gnu/gcj/runtime/VMClassLoader.java (getVMClassLoader): Removed. (instance): Static initialize singleton. (findClass): Override this, not findSystemClass. * java/lang/natClassLoader.cc (defineClass0): Set class's protectionDomain field as specified. (getSystemClassLoader): Removed. (findClass): Renamed from findSystemClass. Call the interpreter via URLClassLoader.findClass if loading class via dlopen fails. * java/security/*.java: java.security import/merge with Classpath. * java/security/acl/*.java: Likewise. * java/security/interfaces/*.java: Likewise. * java/security/spec/*.java: Likewise. * java/net/NetPermission.java: Likewise. * java/net/SocketPermission.java: Likewise. * gnu/java/security/provider/DefaultPolicy.java: Likewise. * Makefile.am: Add new classes. * Makefile.in: Rebuilt. * gcj/javaprims.h: CNI namespace rebuild. From-SVN: r41543
2001-04-20natSystem.cc (getSystemTimeZone): Adjust for DST.Warren Levy1-2/+4
* java/lang/natSystem.cc (getSystemTimeZone): Adjust for DST. * java/text/SimpleDateFormat.java (indexInArray): Removed private method. (processYear): Removed private method. (parseLenient): Removed private method. (parseLeadingZeros): Removed private method. (parseStrict): Removed private method. (expect): Added new private method. (parse): Reverted to pre-Classpath merge version with minor fixes. * java/util/natGregorianCalendar.cc (computeTime): Handle strict calendars. From-SVN: r41456
2001-04-10natString.cc (_Jv_NewStringUtf8Const): Register finalizer.Per Bothner1-6/+12
* java/lang/natString.cc (_Jv_NewStringUtf8Const): Register finalizer. Recalculate hash, since Utf8Const's hash is only 16 bits. * java/lang/natString.cc (_Jv_StringFindSlot, rehash): Use high-order bits of hash to calculate step for chaining. * java/lang/natString.cc (intern, _Jv_NewStringUtf8Const): Rehash when 2/3 full, rather than 3/4 full. From-SVN: r41233
2001-04-02natSystem.cc (init_properties): Revert yesterday's changes to ↵Bryce McKinlay1-9/+9
"file.separator"... * java/lang/natSystem.cc (init_properties): Revert yesterday's changes to "file.separator", "path.separator", and "java.io.tmpdir" property initialization. * java/io/File.java: Likewise. * java/io/natFile.cc (init_native): Likewise. * java/io/natFileWin32.cc (init_native): Likewise. From-SVN: r40994
2001-04-01natString.cc (intern): If string's data does not point to this String, make ↵Per Bothner2-7/+9
a fresh String that does. * java/lang/natString.cc (intern): If string's data does not point to this String, make a fresh String that does. * java/lang/natString.cc (unintern): Replace by static function. * java/lang/String.java (unintern): Remove method. From-SVN: r40990
2001-04-011.3-Compliant Implementation of java.io.File.Bryce McKinlay1-9/+9
* java/lang/natSystem.cc (init_properties): Get "file.separator", "path.separator", and "java.io.tmpdir" from the File class, instead of setting them explicitly. * java/io/File.java: Do not canonicalize paths for security manager checks. Call init_native() from static initializer. Do not pass path argument to native methods. New native method declarations. Some security manager checks moved to checkWrite(). (equals): Check file system case sensitivity and act appropriatly. (hashCode): Likewise. (isHidden): New method implemented. (performList): Changed prototype. Now takes a class argument specifying the class of the returned array: Strings or File objects. Also added FileFilter argument. (listFiles): New variants with "File" return type implemented. (createTempFile): Use createNewFile(). Use maxPathLen. (setReadOnly): New method implemented. (listRoots): Likewise. (compareTo): Likewise. (setLastModified): Likewise. (checkWrite): New method. (setPath): Removed. * java/io/natFile.cc: Various functions no longer take canonical path argument. (stat): Handle ISHIDDEN query. (isAbsolute): Remove WIN32 cruft. (performList): New arguments. Handle returning either File[] or String[] arrays. Check with FileFilter or FilenameFilter arguments as appropriate. Use an ArrayList, not a Vector, for the temporary list. (performSetReadOnly): New method implemented. (performListRoots): Likewise. (performSetLastModified): Likewise. (performCreate): Likewise. (init_native): New initialization function. * java/io/natFileWin32.cc: Various functions no longer take canonical path argument. (stat): Add FIXME about ISHIDDEN query. (performList): New arguments. Handle returning either File[] or String[] arrays. Check with FileFilter or FilenameFilter arguments as appropriate. Use an ArrayList, not a Vector, for the temporary list. (performSetReadOnly): New. Stubbed. (performListRoots): Likewise. (performSetLastModified): Likewise. (performCreate): Likewise. (init_native) New initialization function. * configure.in: Check for utime() and chmod(). * configure: Rebuilt. * include/config.h.in: Rebuilt. Resolves PR libgcj/1759. From-SVN: r40985
2001-03-25exception.cc (java_eh_info): Make value type jthrowable.Richard Henderson13-134/+134
* exception.cc (java_eh_info): Make value type jthrowable. (_Jv_type_matcher): Remove now unneeded cast. (_Jv_Throw): Make argument type jthrowable. Munge name for SJLJ_EXCEPTIONS here ... * gcj/cni.h: ... not here. (JvThrow): Remove. * gcj/javaprims.h (_Jv_Throw, _Jv_Sjlj_Throw): Update declarations. * defineclass.cc, interpret.cc, jni.cc, posix-threads.cc, prims.cc, resolve.cc, gnu/gcj/runtime/natFirstThread.cc, gnu/gcj/xlib/natDrawable.cc, gnu/gcj/xlib/natFont.cc, gnu/gcj/xlib/natWMSizeHints.cc, gnu/gcj/xlib/natWindowAttributes.cc, gnu/gcj/xlib/natXImage.cc, java/io/natFile.cc, java/io/natFileDescriptorEcos.cc, java/io/natFileDescriptorPosix.cc, java/io/natFileDescriptorWin32.cc, java/io/natFileWin32.cc, java/lang/natClass.cc, java/lang/natClassLoader.cc, java/lang/natDouble.cc, java/lang/natObject.cc, java/lang/natPosixProcess.cc, java/lang/natRuntime.cc, java/lang/natString.cc, java/lang/natSystem.cc, java/lang/natThread.cc, java/lang/reflect/natArray.cc, java/lang/reflect/natConstructor.cc, java/lang/reflect/natField.cc, java/lang/reflect/natMethod.cc, java/util/zip/natDeflater.cc, java/util/zip/natInflater.cc: Use throw, not JvThrow or _Jv_Throw. From-SVN: r40838
2001-03-23natDouble.cc (parseDouble): Cannot use errno to check for errors...Per Bothner1-15/+25
* java/lang/natDouble.cc (parseDouble): Cannot use errno to check for errors, since we don't want to throw exception on overflow/underflow. Instead, trim whitespace, and then check that _strtod_r uses up all the rest of the string. From-SVN: r40800
2001-03-23natClass.cc (_Jv_IsAssignableFrom): Checking the ancestors array is invalid ↵Per Bothner1-7/+10
for interfaces... * java/lang/natClass.cc (_Jv_IsAssignableFrom): Checking the ancestors array is invalid for interfaces, so do that *after* check that the target type is not an interface. From-SVN: r40797
2001-03-23jni.cc (_Jv_JNI_GetAnyFieldID): Handle unresolved fields.Tom Tromey2-14/+7
* jni.cc (_Jv_JNI_GetAnyFieldID): Handle unresolved fields. * java/lang/reflect/natField.cc (getType): Use _Jv_ResolveField unconditionally. * include/jvm.h (_Jv_ResolveField): Declare. * include/java-interp.h (_Jv_ResolveField): Don't declare. * resolve.cc (_Jv_ResolveField): No longer conditional on INTERPRETER. From-SVN: r40785
2001-03-22Method.java (getExceptionTypes): Call getType() to initialize if ↵Bryce McKinlay3-2/+10
exception_types is null. * java/lang/reflect/Method.java (getExceptionTypes): Call getType() to initialize if exception_types is null. * java/lang/reflect/Constructor.java: Likewise. * java/lang/reflect/natConstructor.cc (getType): Initialize exception_types to an empty Object array. From-SVN: r40730
2001-03-18natClass.cc (_Jv_CheckCast): add class names to exceptionMark Wielaard1-1/+6
* java/lang/natClass.cc (_Jv_CheckCast): add class names to exception * gnu/gcj/runtime/FirstThread.java (main): replace / with . in jarMainClassName From-SVN: r40604
2001-03-18natString.cc (rehash): Don't bother with memset; _Jv_AllocBytes returns ↵Tom Tromey1-18/+58
zero'd memory. * java/lang/natString.cc (rehash): Don't bother with memset; _Jv_AllocBytes returns zero'd memory. Use _Jv_AllocBytesChecked. Use UNMASK_PTR. (UNMASK_PTR): New macro. (intern): Unmask pointer before returning it. Register finalizer for the string. (unintern): Handle case where (MASK_PTR): New macro. (PTR_MAKSED): Likewise. (_Jv_NewStringUtf8Const): Use UNMASK_PTR. From-SVN: r40593