Joel Dice
b325221579
rename "resource" URL protocol to "avian_vm_resource"
...
This fixes a problem with JOSM, which attaches its own meaning to the
"resource" protocol. The new name is less likely to cause such
conflicts.
2012-08-11 19:01:32 -06:00
Joel Dice
e2ff771baa
handle basic argument substitution in MessageFormat.format
...
Thanks to Remi for an initial version of this patch.
2012-08-11 08:58:40 -06:00
Joel Dice
e2416ddb85
strip trailing separators when normalizing java.io.File.path
...
This addresses the case of e.g. new File("c:/foo/").exists() returning
false when the specified directory really does exist.
2012-08-11 08:21:14 -06:00
Joel Dice
01be4b23bb
implement JNI methods needed by AWT
...
These include PushLocalFrame, PopLocalFrame, NewDirectByteBuffer,
GetDirectBufferAddress, and GetDirectBufferCapacity.
2012-08-11 06:56:19 -06:00
Joel Dice
6aba7bef5a
add java.lang.Deprecated
2012-08-06 16:55:49 -06:00
Joel Dice
c63668c1ce
fix ArrayIndexOutOfBoundsException when decoding a UTF-8 stream
2012-08-04 16:11:27 -06:00
Joel Dice
852d77d0b5
implement Arrays.toString(byte[])
2012-08-04 16:08:32 -06:00
Damjan Jovanovic
c1aa0b46b5
add support for FreeBSD
2012-08-02 10:41:41 -06:00
Joshua Warner
fffde5f445
add Arrays test for equals and hashCode, handle corner cases with null
2012-07-24 11:31:47 -06:00
Joshua Warner
b034d11221
Ungenerify Arrays.{hashCode|equals}, make Arrays.equals consider nulls equal
2012-07-24 10:03:19 -06:00
Joshua Warner
62ff8440ed
implement Arrays.equals and Arrays.hashCode
2012-07-23 07:28:05 -06:00
Joel Dice
836fc21106
fix bugs in File.getParent and listFiles
...
getParent should return the same value regardless of whether it ends
in a file separator, and listFiles should return null for
non-directories.
2012-07-31 09:27:18 -06:00
Joel Dice
c17710d2b0
fix int32_t*/jint* type incompatibility in java-nio.cpp
2012-07-24 16:50:24 -06:00
Joel Dice
2d6bfa5383
Merge github.com:ReadyTalk/avian
2012-07-24 16:17:09 -06:00
Joel Dice
e85d079cfa
Merge branch 'master' of https://github.com/joshuawarner32/avian
2012-07-24 11:34:18 -06:00
Joel Dice
af34259a01
Merge branch 'master' of https://github.com/joshuawarner32/avian
2012-07-24 10:21:37 -06:00
Joel Dice
52a878fa3e
Merge branch 'master' of https://github.com/joshuawarner32/avian
2012-07-24 09:58:53 -06:00
Mike Keesey
b4ecec3034
Implementing add(T element) in AbstractList, which just calls add(size(), element) and returns true per the spec.
2012-07-23 18:55:11 -06:00
Joel Dice
cace9d4531
use vfork instead of fork on QNX
...
On QNX, fork cannot be used in multithreaded programs, but vfork can,
so that's what we'll use.
http://www.qnx.com/developers/docs/6.4.1/neutrino/getting_started/s1_procs.html
2012-07-17 19:26:37 -06:00
Joel Dice
4237a19b68
add support for QNX on x86_32
...
All but one test is passing. The failure is due to the fact that QNX
doesn't (in general) support calling fork(2) from a multithreaded
process. Thus, we'll need to use spawn instead of fork/exec on QNX,
which I'll attempt in a later commit.
http://www.qnx.com/developers/docs/6.4.1/neutrino/getting_started/s1_procs.html
2012-07-17 18:21:17 -06:00
Joel Dice
38e1e3f521
Merge github.com:dicej/avian
2012-07-17 16:55:40 -06:00
Mike Keesey
59280c5780
Fixed isEmpty() on TreeSet, which actually returned !isEmpty().
2012-07-13 15:46:01 -06:00
Joel Dice
9974d91648
implement DatagramChannel.receive and fix Datagrams to be Java 6 compatible
2012-07-10 14:09:14 -06:00
Joel Dice
3d99ff37cb
Merge remote-tracking branch 'origin/master' into dicej-master
2012-07-09 16:46:21 -06:00
Joel Dice
2ab304acb8
Merge github.com:mkeesey/avian
2012-07-07 16:29:18 -06:00
Mike Keesey
ba1719f1ef
EnumSet.allOf can take advantage of the bulk BitSet.set(start, end) operation to run faster instead of adding each element individually.
2012-07-06 23:47:42 -06:00
Mike Keesey
39ad6da290
made getTrueMask in BitSet a lot more rational with fewer code paths.
2012-07-06 23:42:54 -06:00
Mike Keesey
7947981b4b
Fixed issue where BitSet didn't handle a range of 64 bits correctly on bulk operations - now just return the predefined MASK which has all the bits set when requesting that all the bits be set.
2012-07-06 23:33:05 -06:00
Dain
26209efac2
Fix an off-by-1 error in the remove method.
...
The change to only grow the array when the capacity has been reached
exposed a bug in the remove method when shifting the array elements.
2012-07-06 14:03:56 -06:00
Mike Keesey
9c9ee5c26d
Made the bulk clear() fast like bulk set() and flip() for BitSet.
2012-07-05 22:16:19 -06:00
Mike Keesey
990f4fd154
Moved looping through the partitions to change and generating a mask for start and end values into an iterator. This is to use one code path for several bulk-modification operations like flip(start, end) and set(start, end).
2012-07-04 17:12:50 -06:00
Mike Keesey
0c806f82b5
Made the bulk set() function in BitSet a lot faster by applying an appropriate mask to each partition instead of setting each bit individually.
2012-07-04 16:00:12 -06:00
Mike Keesey
5f1b086150
Fixed an off-by-one error when deciding if we should grow BitSets.
2012-07-03 21:28:59 -06:00
Joel Dice
c602f4673b
implement java.nio.channels.DatagramChannel
2012-07-03 11:24:05 -06:00
Joel Dice
bc1c797911
don't use INT32_MAX for "infinite" select
...
OS X's select implementation doesn't like a number that big, so now we
use 24 hours instead.
2012-07-03 11:17:51 -06:00
Mike Keesey
53f229b84d
Removed extraneous TODO.
2012-07-02 16:21:28 -06:00
Joel Dice
fcef9a7f57
remove Override annotations from EnumSet since they confuse Apple's Java 1.5 compiler
2012-07-02 16:15:38 -06:00
Mike Keesey
6e30366d07
Adding EnumSet, which is backed by a speedy BitSet.
2012-07-02 14:28:51 -06:00
Mike Keesey
d419899ac1
Adding both forms of flip() to BitSet.
2012-07-02 14:28:40 -06:00
Mike Keesey
31311160c3
Adding cardinality() to BitSet.
2012-07-02 14:28:34 -06:00
Mike Jensen
e6e65ecfdc
The file already contains the leading slash. hotspot URL.getFile() also returns a leading slash, so instead of removing the leading slash on the file, we just wont append an extra one here
2012-06-28 10:24:35 -06:00
Joel Dice
153b78f479
fix ArrayList performance issue
...
The ArrayList(Collection) constructor was allocating two arrays
instead of one due to an off-by-one error in ArrayList.grow. This
commit fixes that and makes grow and shrink more robust.
2012-06-14 10:55:03 -06:00
Mike Keesey
478560e269
Merge remote branch 'rtgithub/master' into mkgithubmaster
2012-06-13 15:36:21 -06:00
Mike Keesey
527526c5ea
Defer to underlying PersistentSet for size.
2012-06-13 08:41:15 -06:00
Joel Dice
879df617df
add use-clang option for building with LLVM Clang instead of GCC
...
This also fixes several errors and warnings emitted by Clang.
2012-06-01 17:43:42 -06:00
Joel Dice
b78c772ffb
fix C++11 narrowing conversion errors
2012-06-01 11:46:56 -06:00
Mike Keesey
1f7b1a74e8
Adding java.util.SortedSet.
2012-05-22 16:21:57 -06:00
Mike Keesey
97ffc5b15e
Adding java.util.Queue interface and java.util.AbstractQueue.
2012-05-22 15:23:28 -06:00
Mike Keesey
be869932d0
Adding @Target and the associated ElementType enum for specifying the type an annotation is.
2012-05-22 15:18:42 -06:00
Mike Keesey
a5c9dd6f24
Fixing some issues with runtime annotations within avian.
...
We were not properly converting dots to slashes internally for package names
and we did not properly handle Method.getAnnotations and
Method.getAnnotation(Class<T>) on methods without any annotations.
Added some tests to cover these cases.
2012-05-22 14:02:51 -06:00
Joel Dice
0addd8c814
update copyright years
2012-05-11 17:43:27 -06:00
Joel Dice
f0152f1d33
Merge branch 'jdk7'
2012-05-11 16:41:18 -06:00
Joel Dice
d0eda37a90
make Thread.interrupted static to match Java API
2012-05-11 13:23:19 -06:00
Joel Dice
4a4b82d959
Merge remote branch 'oss/master' into jdk7
2012-05-04 20:24:27 -06:00
Joel Dice
1119675b7a
override InputStream.available for FileInputStream and the instance returned by ZipFile.getInputStream
2012-05-04 19:55:53 -06:00
Joel Dice
616c08fee9
Merge remote branch 'oss/master' into jdk7
...
Conflicts:
makefile
2012-04-10 07:53:00 -06:00
Joel Dice
2fedfdea5b
fix OS X build regression
2012-04-06 16:52:24 -06:00
Joel Dice
2b4407a962
fix iOS build regression
2012-04-05 10:04:53 -06:00
JET
6323c76540
added space before ';' in empty for loop to make Apple happy
2012-04-04 13:13:06 -06:00
JET
57092ece0d
fixed Win32 getenv implementation
2012-04-03 10:38:48 -06:00
JET
2f225795fc
added RuntimePermission and System.getenv()
2012-04-02 22:15:02 -06:00
Joel Dice
382f016415
remove debug logging
2012-03-26 18:12:58 -06:00
Joel Dice
97ebf2173c
Merge remote-tracking branch 'origin/master' into jdk7
2012-03-22 17:00:45 -06:00
Joshua Warner
8e6f5ac6e3
add ZipEntry.isDirectory (trivial implementation)
2012-03-21 10:38:30 -06:00
Joel Dice
9a50e69587
remove debug logging
2012-03-17 22:42:15 -06:00
Joel Dice
c4722fa843
update Unsafe.setMemory to reflect new OpenJDK 7 signature and semantics
2012-03-14 11:54:03 -06:00
Joel Dice
eb9f5c6dcc
Merge remote branch 'oss/master' into jdk7
2012-03-14 08:22:46 -06:00
Joel Dice
756f58210a
add test for sun.misc.Unsafe functionality
2012-03-13 08:28:33 -06:00
Joel Dice
4aefa211a3
File.createNewFile should return false if the file already exists
2012-03-13 08:26:51 -06:00
Joel Dice
6c9a1e1643
add "throws IOException" to java.io.File.createTempFile
2012-03-11 04:57:22 -06:00
Joel Dice
a61c1aba60
Merge remote branch 'oss/master' into jdk7
2012-02-27 18:19:22 -07:00
Joel Dice
b5fda8ee13
use avian.http.Handler for http(s) URLs, not avian.file.Handler
2012-02-27 13:38:47 -07:00
Joel Dice
574a8ea1e2
Merge branch 'master' into prv-ga-merge
2012-02-27 13:28:06 -07:00
Joel Dice
3111f07430
add "throws IOException" to java.io.File.createTempFile
2012-02-20 17:23:18 -07:00
Joel Dice
f63d4584c2
Merge remote branch 'oss/master' into jdk7
2012-02-20 11:08:58 -07:00
Joel Dice
bc5661d6f3
start work on OpenJDK 7 class library port
2012-02-18 15:17:10 -07:00
Joel Dice
750e5f903c
include leading slash in path when parsing URLs in URLStreamHandler
...
This matches the behavior of OpenJDK's version.
2012-02-18 15:14:16 -07:00
Joel Dice
c5ef39f2bd
implement File.getAbsoluteFile for Windows
2012-02-16 18:19:01 -07:00
Dain
84185f0884
Merge remote branch 'origin/http_url' into prv-ga-merge
2012-02-16 11:08:53 -07:00
Joel Dice
9fe2d69b06
improve seed generation in java.util.Random
...
The previous code caused frequent seed collisions for successive calls
to the no-arg constructor, even for single threaded workloads. This
patch should avoid such collisions in both single and multi-threaded
cases.
2012-02-14 15:17:07 -07:00
Joel Dice
a254d20e0e
improve seed generation in java.util.Random
...
The previous code caused frequent seed collisions for successive calls
to the no-arg constructor, even for single threaded workloads. This
patch should avoid such collisions in both single and multi-threaded
cases.
2012-02-14 13:03:13 -07:00
Dain
c323bc86b5
Merge branch 'http_url' into oss-master
2012-02-14 10:54:04 -07:00
Joshua Warner
bbb4529752
implement File.setExecutable(), File.canExecute(), and File.createTempFile()
2012-02-09 14:23:24 -07:00
Joshua Warner
edc768f837
implement File.setExecutable(), File.canExecute(), and File.createTempFile()
2012-02-09 14:04:42 -07:00
Joel Dice
b45528203d
avoid crashes due to calling select or wakeup on a closed Selector
2012-01-31 09:48:05 -07:00
Joel Dice
807f2a8d51
avoid crash when Selector.close is called more than once on the same instance
2012-01-30 13:42:32 -07:00
Dain
a6753c3dc3
Request a share mode of both reading and writing for RandomAccessFile open.
...
This change allows reading and writing to happen concurrently on the
file on Windows.
2012-01-19 15:10:45 -07:00
Joel Dice
7022b23b26
add AbstractCollection.toString implementation
2012-01-12 10:45:05 -07:00
Dain
70408ea717
Fix a bug in parsing the port value from a URL.
2012-01-12 09:55:03 -07:00
Dain
651b0eb49a
Add rudimentary support for http/https protocols in URL.
2012-01-12 09:54:58 -07:00
Joel Dice
9ba7c504da
Merge remote branch 'origin/SWT3.7_UrlUpdates' into oss-master
2011-12-29 11:00:59 -07:00
Ben Limmer
b3850ac76d
Initial attempt at resolving SWT3.7 missing operatons in Avian. Everything seems to be working except floatToIntBits, hence the test case failing.
2011-12-28 15:52:53 -07:00
Dain
c012e18a8b
Add rudimentary support for http/https protocols in URL.
2011-12-02 15:46:36 -07:00
Joel Dice
b29db7fece
fix OpenJDK 7 build error
...
OpenJDK 7's javac doesn't seem to like that we're accessing
Enum.ordinal in compareTo when it's private.
2011-11-19 19:22:34 -07:00
Ben Limmer
21610c1c9b
Merge branch 'master' of ssh://git.ecovate.com/avian
2011-11-09 13:26:51 -07:00
Ben Limmer
89cdd9d0d2
Fixed bug where calling Process.destroy() on a PID that no longer exist kills all processes in Pgroup.
2011-11-09 13:26:36 -07:00
Ben Limmer
f1b0d995a8
Fixed bug where calling Process.destroy() on a PID that no longer exist kills all processes in Pgroup.
2011-11-09 13:18:04 -07:00
Joel Dice
a2c6cc8882
implement ConcurrentLinkedQueue.clear
2011-11-07 15:52:42 -07:00
Joel Dice
bcb62af2a1
fix java-lang.cpp iOS build
2011-11-04 09:37:24 -06:00
Joel Dice
21cc4c6a87
implement AbstractList.indexOf
2011-11-04 08:27:11 -06:00
Joel Dice
6153a5c83b
Merge remote-tracking branch 'git/master'
2011-11-04 08:11:14 -06:00
JET
2b2a2e9446
Completion of previous fix.
2011-11-03 19:30:44 -06:00
JET
216b9a05ea
RandomAccessFile now correctly reports lengths for growing files.
2011-11-03 13:39:24 -06:00
Joshua Warner
90dc552463
implement Process.destroy
2011-11-03 12:30:51 -06:00
JET
3b1c769d2b
Fixed RandomAccessFile to update position after reads.
2011-10-24 09:01:17 -06:00
JET
39bee886e3
ByteBuffer and InputStream now better match the standard.
2011-10-20 13:45:47 -06:00
Joel Dice
b862f5f90a
add bare-bones UUID implementation
2011-09-29 18:27:34 -06:00
Joel Dice
296cb74847
add bare-bones ConcurrentLinkedQueue implementation
2011-09-29 18:26:50 -06:00
Joel Dice
a8bb0d074b
implement first() and last() in TreeSet
2011-09-29 18:25:41 -06:00
Joel Dice
84bcbbcaa3
implement asReadOnlyBuffer and getShort(int) in ByteBuffer
2011-09-29 18:25:03 -06:00
Joel Dice
21d1a6c883
add __attribute__ ((used)) to EXPORT macro definition
...
This ensures that exported functions are not stripped when using the
-dead_strip option to the Apple linker.
2011-09-22 16:57:44 -06:00
Joel Dice
178dd7af34
Merge remote branch 'origin/master' into ios
2011-09-16 20:46:03 -06:00
Joel Dice
916c96c2b9
fix access violation introduced in last commit
2011-09-14 13:27:17 -06:00
Brian Haar
446c09dd33
Fix for File.length() integer overflow on 32-bit Windows.
...
The File.length() method was returning a signed 32-bit value
on 32-bit Windows systems. This was causing an integer overflow
on file sizes greater than 2 GB. This appears to be caused by
the way Windows handles the STAT() function. This patch checks
whether the current platform is Windows then uses the Windows API
to get the correct file size and return it as a jlong.
2011-09-14 13:18:20 -06:00
Joel Dice
6949fc3d60
Merge remote-tracking branch 'origin/master' into ios
2011-09-01 10:53:20 -06:00
Seth Goings
9d636c7ebb
Merge branch 'bufferedReaderFix'
2011-09-01 10:18:06 -06:00
Seth Goings
6ea444f6bf
Fixed incorrect handling of \r\n
2011-09-01 10:17:21 -06:00
Joel Dice
8c9bfccb9e
Merge remote branch 'origin/bufferedReaderFix' into oss-master
2011-09-01 09:37:10 -06:00
Joel Dice
4cc5b5d902
Merge remote branch 'origin/bufferedReaderFix'
2011-09-01 09:35:28 -06:00
Seth Goings
fb3a23f02d
Fixed behavior of readLine accepting *\n\n as a line, not two
2011-09-01 09:31:08 -06:00
Seth Goings
97e03b9f28
Fixed possible ArrayIndexOutOfBounds exception
2011-09-01 09:11:39 -06:00
Seth Goings
c75b06ddc1
Added support for non POSIX line endings. Will now accept: \r and \r\n as line endings (per Sun's JavaDoc)
2011-08-31 20:46:15 -06:00
Joel Dice
4c47f4fae8
Merge remote-tracking branch 'origin/master' into ios
2011-08-23 16:40:01 -06:00
Joel Dice
d09e5ee8eb
fix Windows build regression
2011-08-15 16:37:15 -06:00
Anonymous
16aa5c3d59
improve IOException message in the case of a Runtime.exec() failure
...
We now properly forward the errno value from the child when execvp()
fails, which the parent then uses to for the errno message as well as
including the failed command's name in the message.
2011-08-15 07:12:52 -06:00
Joel Dice
1c59aa51d8
add fields and methods to AbstractList for compatibility
...
Google Protocol Buffers relies on these.
2011-08-12 14:29:22 -06:00
Topher Lamey
10183a9870
Added AbstractMap for protobuf, and String getByte encoding for Latin-1
2011-08-12 13:30:51 -06:00
Anonymous
3d7c65d314
implement File.getAbsolutePath()/File.getAbsoluteFile() on Unix platforms
2011-08-11 08:52:49 -06:00
Anonymous
7ed580cf84
fix boolean deserialization in ObjectInputStream
2011-08-11 08:52:09 -06:00
Joel Dice
e5a8d5c824
add support for Apple iOS on ARM
...
Most tests are passing, but not all, so this still needs more work.
2011-08-10 19:21:48 -06:00
Joel Dice
792653e190
strip leading slashes from name in ZipFile.getEntry
...
This is necessary to allow resource loading of the form
Foo.class.getResourceAsStream("/foo.txt") from JAR files.
2011-07-26 09:09:04 -06:00
Joel Dice
c3824c6844
fix crash when encountering invokespecial call to abstract method
...
We must throw an AbstractMethodError when such a call is executed (not
when the call is compiled), so we compile this case as a call to a
thunk which throws such an error.
2011-07-17 19:54:55 -06:00
Joel Dice
f00317c415
clarify javadoc in Continuations.java
2011-07-16 19:07:54 -06:00
Joel Dice
e3662f13a9
update copyright years and increment version number
2011-07-13 08:25:21 -06:00
Joel Dice
c3fa08c430
fix Thread.interrupt and Thread.interrupted
...
These were both totally broken; the latter wasn't even implemented.
This commit fixes/implements them and adds a simple test to exercise
them.
2011-07-12 14:15:43 -06:00
Joel Dice
272789cf16
use getcwd instead of getenv("PWD") to get workding directory
...
The PWD environment variable is not always set; getcwd is more
reliable.
2011-07-11 10:44:06 -06:00
Joel Dice
506ec7838e
remove unused Classes.vmClass method
2011-07-08 11:45:23 -06:00
Anonymous
794a45cb79
fix various ObjectOutputStream/ObjectInputStream bugs
2011-07-01 08:43:43 -06:00
Topher Lamey
9700b7def1
Changes for protobuf support
2011-06-21 14:37:08 -06:00
Topher Lamey
19856bc346
Changes for protobuf support
2011-06-21 14:37:08 -06:00
Topher Lamey
9aae57ee03
Additions for Protobuf support
2011-06-17 11:23:09 -06:00
Topher Lamey
b891db43bc
Additions for Protobuf support
2011-06-17 11:23:08 -06:00
Joel Dice
50a699a08f
Merge remote branch 'origin/B14038_Lion_appshare' into oss-master
2011-06-03 17:35:40 -06:00
Joel Dice
bcc72e8c9d
Merge remote branch 'remotes/origin/B14038_Lion_appshare' into oss-master
2011-06-03 14:39:50 -06:00
Matt Klich
c7c0a45a61
Revert "OSX Lion build changes"
...
This commit introduced conditional includes which is not the preferred
method. Will do it in the makefile instead.
This reverts commit 7148556979
.
2011-06-01 13:56:03 -06:00
Joel Dice
4514833700
Changes to add end function to Inflater and Deflater per the java spec
2011-05-31 14:46:15 -06:00
Mike Jensen
6b4b4b0b8c
Changes to add end function to Inflater and Deflater per the java spec
2011-05-31 14:31:06 -06:00
Matt Klich
7148556979
OSX Lion build changes
2011-05-26 11:57:30 -06:00
Joel Dice
d4da92d300
fix bugs in Deflater and DeflaterOutputStream
...
Previously, Deflater.deflate would pass Z_SYNC_FLUSH to zlib
unconditionally, which caused the output to be enormous when setInput
was called repeatedly with very small input buffers. In order to
allow zlib to buffer output and thereby maximize compression, we must
use Z_NO_FLUSH until Deflater.finish is called, at which point we
switch to Z_FINISH. We also modify DeflaterOutputStream.close to call
Deflater.finish and write any remaining output to the wrapped stream.
2011-05-16 17:12:41 -06:00
Joel Dice
e788a18bc7
implement java.util.zip.CRC32
2011-05-16 17:12:10 -06:00
Joel Dice
18a6393ecf
fix ClassCastException in ZipFile.getInputStream
...
This was being thrown when the parameter passed was a
JarFile.MyJarEntry, not a ZipFile.MyZipEntry, yet we cast it to the
latter.
2011-05-16 10:30:56 -06:00
Joel Dice
f617c5c9ef
Merge remote branch 'origin/localization' into oss-master
2011-04-09 21:43:44 -06:00
Joel Dice
00b829b8e8
fix Class.getDeclaredMethods
...
Internally, the VM augments the method tables for abstract classes
with any inherited abstract methods to make code simpler elsewhere,
but that means we can't use that table to construct the result of
Class.getDeclaredMethods since it would include methods not actually
declared in the class. This commit ensures that we preserve and use
the original, un-augmented table for that purpose.
2011-04-09 21:20:56 -06:00
Joel Dice
c0f39fbe0c
implement System.nanoTime
...
This is a quick and coarse, but servicable, implementation.
2011-04-08 20:32:33 -06:00
Marcel van den Boer
76fa43548d
Implementation of String.replace(CharSequence, CharSequence)
2011-04-08 20:31:33 -06:00
JET
706f9d91ad
Fixed bug with *nix LANG var region parsing.
2011-04-05 15:13:29 -06:00
Joel Dice
b0ae6343ad
provide proper implementations of JVM_GetDeclaredClasses, JVM_GetDeclaringClass
2011-03-31 19:47:26 -06:00
Joel Dice
1c7abe782d
specify valid code source for system classes
...
This enables use of a class's protection domain to determine what JAR
or directory it came from.
2011-03-31 19:38:44 -06:00
Joel Dice
9fe41b2afc
only return declared interfaces from Class.getInterfaces
...
The result of Class.getInterfaces should not include interfaces
declared to be implemented/extended by superclasses/superinterfaces,
only those declared by the class itself. This is important because it
influences how java.io.ObjectStreamClass calculates serial version
IDs.
2011-03-27 20:29:31 -06:00
Joel Dice
686cbc3637
implement JVM_ResolveClass
...
This just reuses code in avian.Classes which was formerly only used in
the Avian classpath build.
2011-03-26 23:24:48 -06:00
Joel Dice
16a8777fd2
override getResource(s) in SystemClassLoader
...
OpenJDK's java.lang.ClassLoader.getResource makes use of
sun.misc.Launcher to load bootstrap resources, which is not
appropriate for the Avian build, so we override it to ensure we get
the behavior we want.
2011-03-26 18:24:17 -06:00
Joel Dice
3dd091c67a
implement jar and file URL stream handlers
2011-03-25 19:14:21 -06:00
Joel Dice
20baef4e69
implement File.toString
2011-03-25 19:12:47 -06:00
JET
5b830343ba
Properties.java UTF-16 support refactoring.
2011-03-23 17:06:33 -06:00
JET
b29e692c31
Merge branch 'master' into localization
2011-03-23 10:24:44 -06:00
Joel Dice
61552b6b8a
check for and handle instances of sun.misc.Cleaner during GC
...
OpenJDK uses an alternative to Object.finalize for resource cleanup in
the form of sun.misc.Cleaner. Normally, OpenJDK's
java.lang.ref.Reference.ReferenceHandler thread handles this, calling
Cleaner.clean on any instances it finds in its "pending" queue.
However, Avian handles reference queuing internally, so it never
actually adds anything to that queue, so the VM must call
Cleaner.clean itself.
2011-03-19 15:10:52 -06:00
Joel Dice
7004c0ddf3
various fixes and additions to increase app compatiblity
...
The main changes here are:
* fixes for runtime annotation support
* proper support for runtime generic type introspection
* throw NoClassDefFoundErrors instead of ClassNotFoundExceptions
where appropriate
2011-03-17 21:42:15 -06:00
Joel Dice
7152c3fdb3
handle volatile fields properly in JNI Get/Set methods
...
This commit ensures that we use the proper memory barriers or locking
necessary to preserve volatile semantics for such fields when accessed
or updated via JNI.
2011-03-15 19:34:00 -06:00
Joel Dice
453ceb42ab
implement lazy class/field/method resolution in JIT compiler
...
Unlike the interpreter, the JIT compiler tries to resolve all the
symbols referenced by a method when compiling that method. However,
this can backfire if a symbol cannot be resolved: we end up throwing
an e.g. NoClassDefFoundError for code which may never be executed.
This is particularly troublesome for code which supports multiple
APIs, choosing one at runtime.
The solution is to defer to stub code for symbols which can't be
resolved at JIT compile time. Such a stub will try again at runtime
to resolve the needed symbol and throw an appropriate error if it
still can't be found.
2011-03-15 18:07:13 -06:00
Joel Dice
a0962d7ab2
look for __powerpc__ as well as __POWERPC__ in jni-util.h
...
The former is used on GNU/Linux.
2011-02-28 16:50:17 -07:00
JET
f6e2f4af21
Merge branch 'master' into localization
2011-02-21 17:58:50 -07:00
Joel Dice
c761ac6717
fix Subroutine test for use with OpenJDK build
2011-02-17 14:28:51 -07:00
Joel Dice
c743140e08
add new subroutine test
...
This test covers the case where a local stack slot is first used to
store an object reference and later to store a subroutine return
address. Unfortunately, this confuses the VM's stack mapping code;
I'll be working on a fix for that next.
The new test requires generating bytecode from scratch, since there's
no reliable way to get javac to generate the code we want. Since we
already had primitive bytecode construction code in Proxy.java, I
factored it out so we can reuse it in Subroutine.java.
2011-02-16 11:41:33 -07:00
Joel Dice
a8645b6b2d
fix BufferedInputStream.read regression
...
In commit 7fffba2
, I had modified BufferedInputStream.read to keep
reading until in.available() <= 0 or an EOF was reached, but neglected
to update the offset into the destination buffer after each read.
This caused the previously-read data to be overwritten. This commit
fixes that regression.
2011-02-08 18:56:25 -07:00
Joel Dice
220f7760b7
fix MSVC build regressions
2011-01-21 16:14:21 -07:00
Joel Dice
3aff7dc861
add TreeSet(Collection) constructor
2011-01-20 09:39:16 -07:00
Joel Dice
0ca7ed8c67
add Package.getName
2011-01-20 09:35:34 -07:00
Joel Dice
3a2a46499e
add Reader.mark/markSupported/reset
2011-01-20 09:34:46 -07:00
Joel Dice
b57e734ceb
implement Character.forDigit
2011-01-20 09:33:50 -07:00
Joel Dice
51c56c1b3c
add PrintStream.print[ln] overloads for primitives and char arrays
2011-01-20 08:26:56 -07:00
Joel Dice
4a9ff55060
File.length should return 0 for non-existent files
2011-01-17 09:48:34 -07:00
Joel Dice
b6978c6c68
always create file if necessary in Java_java_io_FileOutputStream_open
...
Previously, we would only create the file if it did not already exist
*and* we weren't appending. Now we do so whether appending or not.
2011-01-14 11:26:00 -07:00
Joel Dice
d12d33d716
fix memory leak in Java_java_io_File_length
2011-01-14 08:13:49 -07:00
Joel Dice
69dc2026a1
provide default implementation for ClassLoader.reallyFindLoadedClass
...
This is a non-standard method, so we shouldn't expect subclasses to
implement it.
2011-01-13 08:57:39 -07:00
Joel Dice
0c253c40a2
add ServerSocketChannel.handleReadyOps to fix build
2011-01-13 07:03:28 -07:00
Joel Dice
39018c20e0
check connection readyness in SocketChannel.finishConnect if necessary
2011-01-11 18:39:48 -07:00
Joel Dice
eb3a9f010b
fix false positive return from SocketChannel.finishConnect
...
This fixes a bug in finishConnect such that it would return true even
if the socket had not yet connected successfully.
2011-01-11 18:29:48 -07:00
Joel Dice
4f0dccb53c
add Channels.newChannel methods
2011-01-11 18:26:37 -07:00
Joel Dice
dd52908f89
add URLConnection methods
2011-01-11 18:25:34 -07:00
JET
98166dcc61
ASCII escapes in property files are now parsed, albeit crudely.
2010-12-21 11:39:26 -07:00
JET
7270eb7879
Fixed behavior of Locale and implemented its toString().
2010-12-15 15:18:43 -07:00
Joel Dice
3d49173b0b
avoid inifinite recursion if java.lang.Object is missing; refactoring
...
When trying to create an array class, we try to resolve
java.lang.Object so we can use its vtable in the array class.
However, if Object is missing, we'll try to create and throw a
ClassNotFoundException, which requires creating an array to store the
stack trace, which requires creating an array class, which requires
resolving Object, etc.. This commit short-circuits this process by
telling resolveClass not to create and throw an exception if it can't
find Object.
While doing the above work, I noticed that the implementations of
Classpath::makeThrowable in classpath-avian.cpp and
classpath-openjdk.cpp were identical, so I made makeThrowable a
top-level function.
Finally, I discovered that Thread.setDaemon can only be called before
the target thread has been started, which allowed me to simplify the
code to track daemon threads in the VM.
2010-12-09 19:38:12 -07:00
Joel Dice
a5742f5985
update copyright years
2010-12-05 20:21:09 -07:00
Joel Dice
800463bb45
clarify Continuations.java JavaDoc comment
2010-12-05 18:56:19 -07:00
Joel Dice
1271678d41
various fixes for embedded resource loading in OpenJDK build
2010-12-05 17:40:50 -07:00
Joel Dice
d00f4c5390
fix BufferedInputStream.read to not read more than specified length
2010-12-01 15:41:55 -07:00
Joel Dice
84520cde51
Merge remote branch 'origin/master' into openjdk
2010-12-01 14:40:58 -07:00
Joel Dice
d4708907ea
fix non-openjdk build
2010-11-27 11:31:34 -07:00
Joel Dice
459f4d5194
fix openjdk-src bootimage build
...
The main change here is to use a lazily-populated vector to associate
runtime data with classes instead of referencing them directly from
the class which requires updating immutable references in the heap
image. The other changes employ other strategies to avoid trying to
update immutable references.
2010-11-26 12:41:31 -07:00
Joel Dice
f9197cb076
fix a few HashMap bugs
...
1. HashMap.containsValue only checked one hash bucket, which was
pretty much useless :)
2. HashMap.MyIterator.remove was broken in that it failed to
decrement the size field and it did not update the previousCell field
properly, which sometimes led to more than one cell being removed.
2010-11-21 17:26:17 -07:00
Joel Dice
aac85ff278
remove @Overload annotation since Java 1.5.0_19 chokes on it
2010-11-17 10:42:28 -07:00
Joel Dice
a611ccda6f
Merge remote branch 'origin/master' into openjdk
...
Conflicts:
makefile
src/compile.cpp
src/compiler.cpp
src/type-generator.cpp
2010-11-16 10:18:08 -07:00
Joel Dice
44f55673d6
fix handle leaks in Windows Process implementation
2010-11-09 14:56:26 -07:00
Joel Dice
2d60398e63
fix bug which caused Runtime.exec to block until process exits
2010-11-09 12:38:23 -07:00
Joel Dice
ababc5748d
fix regression in last commit
...
My last commit unintentionally changed the return type of Runtime.exec
to Runtime.MyProcess instead of Process.
2010-11-09 11:21:55 -07:00
Joel Dice
3d18f88ad9
fix Runtime.exec bugs
...
The first bug affected POSIX systems: if the app never called
Process.waitFor, we'd never call waitpid on the child and thus leak a
zombie process. This patch ensures that we always call waitpid by
spawning a thread to handle it.
The second bug affected Windows systems: we weren't closing the
child's ends of the stdin, stdout, and stderr pipes after process
creation, which lead to us blocking forever while reading from the
child's stdout or stderr.
2010-11-09 10:22:23 -07:00
JET
8c54446c67
Fixed minor compiler warnings.
2010-11-08 09:47:46 -07:00
Joel Dice
580e7e1b3f
remove @Overload annotation since Java 1.5.0_19 chokes on it
2010-11-07 12:57:42 -07:00
Joel Dice
cb69ac23bd
Merge remote branch 'origin/master' into openjdk
...
Conflicts:
classpath/java/lang/String.java
src/posix.cpp
2010-11-03 11:54:41 -06:00
Joel Dice
5ade8d1cf6
use GetSystemTimeAsFileTime instead of _ftime on Windows
...
It seems that _ftime has devolved to only giving 1-second resolution
on Windows 7. GetSystemTimeAsFileTime does better, so that's what
we'll use.
2010-10-28 20:30:49 -06:00
Joel Dice
5cbfee467c
fix Runtime.exec on Posix
...
Due to a silly cut-and-paste error, we were incorrectly passing the
stdout and stderr file descriptors back from native code to Java,
which prevented reading the output of the child process.
2010-10-22 14:39:38 -06:00
jet
0713f8d5cb
Locale system changes to better mimic Sun's VM.
2010-10-14 16:20:41 -06:00
Joel Dice
b3accf1b30
ServerSocketChannel throws IOException, not Exception
2010-10-13 13:38:31 -06:00
jet
cddc305a75
Locale error checking is now more robust.
2010-10-07 16:32:59 -06:00
jet
8feb5a8124
Fixed bug where locale region became a copy of the language.
2010-10-05 22:29:41 -06:00
JET
45e6cd5a60
The localization properties are now functional. Only 16 languages are currently reported on Windows.
2010-10-05 17:53:17 -06:00
jet
1fdc016e58
Beginning of branch. Being pushed for testing purposes.
2010-10-05 17:24:44 -06:00
Joel Dice
c1c9d2111b
remove GNU Classpath and Apache Harmony compatibility code
...
Rather than try to support mixing Avian's core classes with those of
an external class library -- which necessitates adding a lot of stub
methods which throw UnsupportedOperationExceptions, among other
comprimises -- we're looking to support such external class libraries
in their unmodified forms. The latter strategy has already proven
successful with OpenJDK's class library. Thus, this commit removes
the stub methods, etc., which not only cleans up the code but avoids
misleading application developers as to what classes and methods
Avian's built-in class library supports.
2010-09-27 15:58:02 -06:00
Joel Dice
268d2de175
cache array class lookups in element class; misc. bugfixes
2010-09-25 15:54:01 -06:00
Joel Dice
c939d16687
formatting tweak in Classes.java
2010-09-25 15:51:30 -06:00
Joel Dice
0456a9fd49
define user.dir property in Java_java_lang_System_getProperty
2010-09-20 17:28:42 -06:00
Joel Dice
64e42da348
implement avian.Handler.ResourceInputStream.available
2010-09-17 16:11:04 -06:00
Joel Dice
7fffba29e6
Keep reading in BufferedInputStream.read until in.available() <= 0
...
This corresponds to the documented behavior of OpenJDK's version.
2010-09-17 16:08:42 -06:00
Joel Dice
d0d53e2e10
fix custom-classloader-related concurrency problems and other bugs
...
The main changes in this commit ensure that we don't hold the global
class lock when doing class resolution using application-defined
classloaders. Such classloaders may do their own locking (in fact,
it's almost certain), making deadlock likely when mixed with VM-level
locking in various orders.
Other changes include a fix to avoid overflow when waiting for
extremely long intervals and a GC root stack mapping bug.
2010-09-16 20:49:02 -06:00
Joel Dice
f485016637
implement more JVM_* methods and avoid duplicate array class loading
2010-09-14 18:52:57 -06:00
Joel Dice
d819a75f36
more work towards OpenJDK classpath support
...
The biggest change in this commit is to split the system classloader
into two: one for boot classes (e.g. java.lang.*) and another for
application classes. This is necessary to make OpenJDK's security
checks happy.
The rest of the changes include bugfixes and additional JVM method
implementations in classpath-openjdk.cpp.
2010-09-14 10:49:41 -06:00
Joel Dice
76132bec90
set wsaInitialized to true on success in Java_java_net_Socket_init
2010-09-13 19:50:24 -06:00
Joel Dice
74a87a7f4f
use _waccess on windows to implement File.can{Read|Write}
2010-09-12 14:46:14 -06:00
Joel Dice
345c7d38a9
Merge http://github.com/gzsombor/avian into gzsombor
2010-09-12 14:33:02 -06:00
Joel Dice
522f8ca1a5
javadoc grammar correction in Continuations.java
2010-09-12 14:29:27 -06:00
Zsombor Gegesy
6752505cb8
add File.canRead()/File.canWrite() implementation
2010-09-11 21:23:46 +02:00
Zsombor Gegesy
7376425b24
dummy SecurityManager and related classes added
2010-09-11 21:23:46 +02:00
Zsombor Gegesy
6985e81503
add Properties.load(Reader) implementation
2010-09-11 21:23:46 +02:00
Zsombor Gegesy
5dadac2cb8
API additions for compatibility with harmony's java.util package
2010-09-11 21:23:46 +02:00
Zsombor Gegesy
fc2c6d5100
implement toLowerCase(Locale) in the default case
2010-09-11 21:23:46 +02:00
Joel Dice
64100d17c7
Merge branch 'master' of oss.readytalk.com:/var/local/git/avian into openjdk
2010-09-10 15:58:43 -06:00
Joel Dice
cddea7187d
preliminary support for using OpenJDK's class library
...
Whereas the GNU Classpath port used the strategy of patching Classpath
with core classes from Avian so as to minimize changes to the VM, this
port uses the opposite strategy: abstract and isolate
classpath-specific features in the VM similar to how we abstract away
platform-specific features in system.h. This allows us to use an
unmodified copy of OpenJDK's class library, including its core classes
and augmented by a few VM-specific classes in the "avian" package.
2010-09-10 15:05:29 -06:00
Joel Dice
250a77dc13
handle empty strings properly in Pattern.split
...
We were incorrectly returning an empty array when the input was empty,
whereas we ought to return an array containing a single empty string.
When the pattern to match was empty, we went into a loop to create an
infinite list of empty strings, only to crash once we've run out of
memory. This commit addresses both problems.
2010-09-06 11:16:27 -06:00
Eric Scharff
a26eb1b2b9
Fix missing flush in PrintStream
2010-09-05 09:07:18 -06:00
Joel Dice
17c1a552d5
break each Class, Field, and Method into separate classes
...
In order to facilitate making the VM compatible with multiple class
libraries, it's useful to separate the VM-specific representation of
these classes from the library implementations. This commit
introduces VMClass, VMField, and VMMethod for that purpose.
2010-09-01 10:13:52 -06:00
Joel Dice
4273ff834c
remove uncessary parentheses from Enum.java
2010-09-01 10:10:11 -06:00
Zsombor Gegesy
4169425307
add error classes
2010-08-16 09:23:48 -06:00
Zsombor Gegesy
a50fda1a5e
add ClassLoader.getResources calls
2010-08-16 09:23:48 -06:00
Zsombor Gegesy
03b66375f4
add Collections.enumeration(Collection<T> c)
2010-08-16 09:23:48 -06:00
Zsombor Gegesy
4dc05844df
add java.util.Properties.propertyNames() method
2010-08-16 09:23:48 -06:00
Zsombor Gegesy
1daa93d3c4
add ability to append to files
2010-08-16 09:23:48 -06:00
Joel Dice
f0f35a920f
return a useful value from InflaterInputStream.available
...
Note the following excerpt from PNGFileFormat.java in SWT:
/*
* InflaterInputStream does not consume all bytes in the stream
* when it is closed. This may leave unread IDAT chunks. The fix
* is to read all available bytes before closing it.
*/
while (stream.available() > 0) stream.read();
stream.close();
This code relies on the documented behavior of
InflaterInputStream.available, which must return "0 after EOF has been
reached, otherwise always return 1". This is unlike
InputStream.available, which is documented to return "the number of
bytes that can be read (or skipped over) from this input stream
without blocking by the next caller of a method for this input
stream", and says nothing about how many bytes are left until the end
of stream.
This commit modifies InflaterInputStream.available to behave according
to Sun's documentation.
2010-08-04 18:54:47 -06:00
Joel Dice
f0129665c6
fix corruption of old revisioins in PersistentSet
...
In PersistentSet.remove, we were modifying the child node in place
instead of making a copy to update, which would corrupt older
revisions. This commit ensures that we always create a copy if
necessary.
2010-07-30 12:23:41 -06:00
Joel Dice
b3da635b63
add java.nio.channels.Channels implementation
2010-07-13 18:03:25 -06:00
Joel Dice
a3daeee1f6
Merge branch 'dns'
2010-07-02 12:39:41 -06:00
Joel Dice
5e7e539c2a
fix non-windows java-net.cpp build
2010-07-02 09:36:55 -06:00
Joel Dice
cdc48da493
grammar tweaks to Continuations.java JavaDoc
2010-06-15 18:40:12 -06:00
Joel Dice
1b31fb67e1
Merge branch 'master' of oss.readytalk.com:/var/local/git/avian
2010-06-15 18:27:51 -06:00
Joel Dice
47d9039b69
switch from gethostbyname to getaddrinfo on POSIX systems
...
gethostbyname may return any combination of IPv4 and IPv6 addresses,
and it's not safe to assume the first address is IPv4, which is all
our code is currently prepared to handle. In contrast, getaddrinfo
allows us to specify whether we want IPv4, IPv6, or both.
We should eventually make this switch on Windows as well, but the
status of getaddrinfo in Windows 2000 is not clear, and MinGW's
ws2tcpip.h only declares it for XP and above.
This commit also adds InetAddress.getByName for explicit DNS lookups.
2010-06-14 16:09:56 -06:00
Joel Dice
f3a1c3253e
use closesocket instead of close on Windows
...
MinGW's close apparently does nothing, and MSVC's headers don't even
declare it, so closesocket is the way to go.
2010-06-04 18:45:13 -06:00
Joel Dice
b908f575d5
fix several blocking SocketChannel bugs
...
In java-nio.cpp, we can't use GetPrimitiveArrayCritical when reading
from or writing to blocking sockets since it may block the rest of the
VM indefinitely.
In SelectableChannel.java, we can't use a null test on
SelectableChannel.key to determine whether the channel is open since
it might never be registered with a Selector. According to the Sun
documentation, a SelectableChannel is open as soon as it's created, so
that's what we now implement.
2010-06-04 15:37:22 -06:00
Matt Klich
83c51f4801
Fix signed vs. unsigned comparison for 32bit build with mingw64
2010-05-13 16:59:08 -06:00
mjensen
a6998238d5
Additional of several interfaces which can be used in serialization
2010-05-10 10:17:06 -06:00
JET
c666ab58e3
Improved (should now be complete) Unicode support (UTF-8 for *nix and UTF-16 for Windows).
2010-04-20 10:03:07 -06:00
JET
b6936fb597
optimized InputStreamReader.read()
2010-04-14 09:43:56 -06:00
JET
b2f5e71d22
ARM and UTF-8 work
2010-04-14 09:26:50 -06:00
Joel Dice
a650f1affa
provide more useful message when throwing exception from Field.set
2010-03-07 12:03:17 -07:00
Joel Dice
fdf9c5087b
register socket with exceptfds when calling select on Windows
...
This allows us to get connection errors like WSAECONNREFUSED in
non-blocking mode.
2010-02-19 16:41:27 -07:00
Joel Dice
5d781a0584
declare Long.MAX_VALUE and Long.MIN_VALUE as longs, not Longs
2010-02-02 09:33:10 -07:00
Joel Dice
2c4e229e6e
convert forward slashes to back slashes in Windows paths
2010-01-11 08:31:01 -07:00
Joel Dice
b1a1391093
skip "." and ".." in File.list{Files} to match Sun
2010-01-09 19:18:39 -07:00
Joel Dice
585dba004b
ignore redundant calls to File{In|Out}putStream.close
...
Previously, we threw an IOException, which did not match Sun's behavior.
2010-01-09 18:22:16 -07:00
Joel Dice
9a056da2f7
increase default buffer size in BufferedInputStream
...
The previous value of 32 bytes did not perform well. This increases it to 4096 bytes, which matches BufferedOutputStream.
2010-01-09 18:20:15 -07:00
Joel Dice
664cb3cd39
don't try to parse annotation tables more than once; use defining classloader when loading array classes during linking
2009-12-24 17:58:48 -07:00
Joel Dice
f588a62ae3
fix Classpath 0.98 compatibility issues
2009-12-22 21:34:04 -07:00
Joel Dice
30db38ebd6
replace calls to ExceptionOccurred with calls to ExceptionCheck
...
The latter is cheaper (avoids a state transition and possible memory
allocation) when we just want to know if an exception is thrown
without needing a handle to that exception.
2009-12-16 19:25:03 -07:00
Joel Dice
70da0df46b
add Class.getExceptionTypes method
2009-12-15 10:04:51 -07:00
Joel Dice
875a1a45a3
pass valid pReturnValue parameter to _wgetenv_s
2009-12-12 17:55:00 -07:00
Joel Dice
f0c14fa1f1
Merge branch 'master' of oss.readytalk.com:/var/local/git/avian
2009-12-06 13:35:07 -07:00
Joel Dice
bec3766180
fix misuse of term "recursive" in Continations JavaDoc
2009-12-06 13:34:31 -07:00
Joel Dice
ccbb4796f2
fix typo in JavaDoc comment
2009-12-05 22:49:23 -07:00
Joel Dice
0c85fc7527
throw OutOfMemoryError if malloc returns null pointer
2009-12-05 15:51:12 -07:00
Joel Dice
112e2a71d5
update copyright years
2009-12-05 15:50:23 -07:00
jent
99a1c12682
Files to add Deflater and DeflaterOutputStream to java.util.zip for
...
avian
2009-12-04 12:01:31 -07:00
Joel Dice
6118792ffd
update copyright years
2009-12-02 19:08:29 -07:00
jent
f39469e71c
Changes for better memory managment
2009-12-01 09:54:36 -07:00
Joel Dice
6475beda83
don't null out array in HashMap when size drops to zero
...
As in ArrayList, we want to avoid thrashing in cases where the map is frequently emptied and refilled.
2009-11-19 12:55:53 -07:00
Joel Dice
adcac443e4
don't null out array in ArrayList when size goes to zero
...
This avoids thrashing in the case of a list which is frequently
emptied and refilled with a small number of elements.
2009-11-19 11:43:11 -07:00
Joel Dice
3862128a3a
tolerate EINTR in ServerSocketChannel.accept implementation
...
On POSIX systems, Avian sends a special signal to a thread to
implement Thread.getStackTrace() when called from a different thread.
If the target thread is blocked on a call to accept when this happens,
it will return -1, with errno set to EINTR. Instead of treating this
as an error, we now just loop and call accept again.
2009-11-16 17:23:09 -07:00
Joel Dice
ef00ff80ef
avoid EAGAIN or EWOULDBLOCK errors due to SocketSelector.wakup being called many times between calls to select
2009-10-30 08:55:55 -06:00
Joel Dice
efdfb796d9
implement SocketChannel.isConnected
2009-10-29 16:19:33 -06:00
Joel Dice
3c893b2ee3
Merge commit 'origin/master' into wip
2009-10-27 10:36:19 -06:00
Joel Dice
1fd00dd55d
revert all __attribute__ ((externally_visible)) changes because it's not clear yet how to detect whether it's supported
2009-10-27 10:35:26 -06:00
Joel Dice
8bf3487ff1
Merge commit 'origin/master' into wip
2009-10-27 09:35:13 -06:00
Joel Dice
51fcf1ef74
ammend recent commit to avoid using __attribute__ ((externally_visible)) when it is not available
2009-10-27 09:34:46 -06:00
Joel Dice
2efff818ea
Merge commit 'origin/master' into wip
2009-10-27 09:17:54 -06:00
Joel Dice
b15ff58542
provide a useful error message when throwing IOExceptions from Java_java_nio_channels_SocketChannel_natFinishConnect
2009-10-27 09:17:08 -06:00
Joel Dice
4570b86da0
add __attribute__ ((externally_visible)) to EXPORT macros to facilitate whole-program optimization using GCC 4.5
2009-10-27 09:16:08 -06:00
Joel Dice
a68742200b
return empty stack trace for thread which isn't running
2009-10-26 11:44:29 -06:00
Joel Dice
5967246b37
Merge commit 'origin/master' into wip
2009-10-20 14:15:35 -06:00
Joel Dice
53588b94f3
compare lengths first in String.equals[IgnoreCase] for efficiency
2009-10-19 10:36:48 -06:00
Joel Dice
984f3106fd
fix powerpc build
2009-10-19 10:31:34 -06:00
Joel Dice
7b0378c180
support darwin/x86_64
2009-10-14 10:01:37 -06:00
Joel Dice
1b893c7a19
check for EINPROGRESS in Java_java_nio_channels_SocketChannel_natFinishConnect
2009-10-12 09:28:04 -06:00
Joel Dice
59ba4aecf2
implement non-blocking socket connections
2009-10-08 16:26:20 -06:00
Mike Keesey
77fb0083a4
updated nio native code to properly check for PIPE closure on POSIX OSes
2009-10-05 09:23:53 -06:00
Joel Dice
447741d6ec
implement java.io.File.renameTo
2009-09-28 17:45:47 -06:00
Joel Dice
fb40b046fd
fix regression in SocketSelector when selecting ServerSocketChannels
2009-09-28 16:54:49 -06:00
Joel Dice
1faf93c163
fix typo in Proxy.makeInvokeCode
2009-09-19 16:27:28 -06:00
Joel Dice
953cb69e5e
move proxy and annotation code from C++ to Java
...
This allows code shrinkers to remove it if it's not used by the application.
2009-09-19 16:21:15 -06:00
Joel Dice
1a2eb3836c
Merge branch 'master' of oss.readytalk.com:/var/local/git/avian
2009-09-18 18:01:57 -06:00
Joel Dice
7aa906d97b
support runtime-visible annotations and java.lang.reflect.Proxy
2009-09-18 18:01:54 -06:00
Joel Dice
6fa25f992c
Properties.setProperty should return an Object
2009-09-18 17:51:05 -06:00
Joel Dice
3446ed0fce
fix MSVC build regression in java-io.cpp
2009-09-05 15:35:00 -06:00
Joel Dice
e47c149fb1
fix misuse of FindFirstFile
2009-09-03 17:57:32 -06:00
Joel Dice
0a96f4c552
ensure WeakHashMap.MyCell objects are registered with the ReferenceQueue
2009-09-01 17:22:31 -06:00
Joel Dice
987330fed5
Merge branch 'master' of oss.readytalk.com:/var/local/git/avian
2009-08-28 16:18:36 -06:00
Joel Dice
cd41751912
ensure primitive names are zero-terminated in Class.getName
2009-08-28 16:17:23 -06:00
Joel Dice
73dc058c14
implement StackTraceElement.getFileName properly
2009-08-27 16:28:44 -06:00
Joel Dice
1a0eef7e2d
add support for building with MSVC on Windows
2009-08-26 18:26:44 -06:00
Joel Dice
d4e2e05b31
add AccessControlException
2009-08-24 16:40:25 -06:00
Joel Dice
77ae259e41
throw ClassCastException if asked to compare Enums of different types
2009-08-21 16:06:12 -06:00
Joel Dice
c14bb5768e
throw FileNotFoundException from doOpen when appropriate
2009-08-21 09:23:03 -06:00
Joel Dice
4c14a9ab66
implement enough of java.util.regex to ensure String methods work for trivial regular expressions
2009-08-20 11:14:05 -06:00
Joel Dice
71f1efc4cb
add a couple of StringBuffer.append overloads
2009-08-20 08:59:22 -06:00
Joel Dice
c4b5ecec90
implement Runtime.addShutdownHook and Thread.setDaemon; avoid segfaults due to an application calling e.g. CallStaticBooleanMethod when it really meant CallStaticVoidMethod
2009-08-19 14:27:03 -06:00
Joel Dice
c4edabdc02
implement ClassLoader.resolveClass and ensure class is linked in e.g. Class.getMethods; minor bugfixes
2009-08-18 14:26:28 -06:00
Joel Dice
6d54b6cec8
add classes which I meant to add in earlier commits
2009-08-14 08:51:10 -06:00
Joel Dice
9553d56977
add AccessibleObject.setAccessible(AccessibleObject[],boolean)
2009-08-13 09:03:44 -06:00
Joel Dice
f96fa82607
add methods to Throwable
2009-08-13 09:03:04 -06:00
Joel Dice
017116d060
add ThreadGroup(String) constructor
2009-08-13 09:02:32 -06:00
Joel Dice
0d7a2fa2bc
add methods to StringBuilder and fix logic error in getChars
2009-08-13 09:02:00 -06:00
Joel Dice
ae02212dd9
add a few methods to String; support ISO-8859-1 charset
2009-08-13 09:00:07 -06:00
Joel Dice
864a28f2ce
throw IllegalArgumentException from Enum.valueOf if name does not match any value
2009-08-13 08:57:58 -06:00
Joel Dice
fb37f48237
add various methods to Class and fix getComponentType for primitive arrays
2009-08-13 08:57:06 -06:00
Joel Dice
58e3c3013a
pass start and end indexes to String.getChars in Writer.write, not start and length
2009-08-13 08:55:35 -06:00
Joel Dice
0544ab381f
fix Class.isArray for case this == Class.class
2009-08-12 19:40:52 -06:00
Joel Dice
dd82b58dad
add String.lastIndexOf(String,int); defer to Pattern.split in String.split
2009-08-12 19:39:29 -06:00
Joel Dice
df1aee5981
replace slashes with dots in class name passed to Class.forName in Method.getParameterTypes
2009-08-11 09:25:05 -06:00
Joel Dice
d868815737
put thread into runnable state in Thread.start
2009-08-10 17:36:11 -06:00
Joel Dice
001000364d
add classloader parameter to functions which may directly or indirectly load classes; include methods inherited from interfaces (but not explicitly declared) in method tables and virtual tables of abstract classes
2009-08-10 07:56:16 -06:00
Joel Dice
58c3a37277
specify classloader when calling Class.forCanonicalName in Field and Method; tolerate null argument array in Method.invoke
2009-08-10 07:48:44 -06:00
Joel Dice
5c72746d2c
inherit thread group from current thread
2009-08-10 07:46:59 -06:00
Joel Dice
97ea23e3bb
optionally specify classloader to Class.forCanonicalName
2009-08-10 07:46:05 -06:00
Joel Dice
1a2deff97d
Merge branch 'master' of oss.readytalk.com:/var/local/git/avian
2009-08-09 14:43:53 -06:00
jet
1ffe46a545
added ARM interpreted mode supported
2009-08-06 11:52:36 -06:00
Joel Dice
6d27274aea
update Class.PrimitiveFlag value to reflect change in machine.h; make Class.getName work for primitive types
2009-08-05 15:57:51 +00:00
Joel Dice
2de750768b
add java.lang.reflect.Modifier.isInterface
2009-08-05 14:14:45 +00:00
Joel Dice
7050448ec5
implement Class.{get|set}Signers
2009-08-04 18:31:14 -06:00
Joel Dice
e18ab49f4d
always pass null instance to native version of Method.invoke when invoking static methods
2009-08-04 18:30:16 -06:00
Joel Dice
626c514373
add listFiles and isFile methods to java.io.File
2009-08-04 17:59:07 -06:00
Joel Dice
590238bbfc
add indexOf and lastIndexOf methods to java.util.List
2009-08-04 17:58:31 -06:00
Joel Dice
0a7f94abfe
add java.util.Collection.toArray()
2009-08-04 17:36:25 -06:00
Joel Dice
7911989055
add AbstractList and AbstractSequentialList classes to java.util and listIterator methods to java.util.List
2009-08-04 17:24:29 -06:00
Joel Dice
93597a4d1d
implement ArrayList.listIterator()
2009-08-04 11:34:46 -06:00