Mike Jensen
3372210f45
Added .get() implementation
2012-08-16 16:13:51 -06:00
Joel Dice
2687333a37
Merge remote-tracking branch 'github/master'
2012-08-12 15:03:40 -06:00
Joel Dice
b98abe3f94
fix float to integer conversion
...
Java requires that NaNs be converted to zero and that numbers at or
beyond the limits of integer representation be clamped to the largest
or smallest value that can be represented, respectively.
2012-08-12 14:31:58 -06:00
Joel Dice
47503854d5
Thread.sleep(0) should not sleep indefinitely
...
Our implementation uses Object.wait(long) to implement Thread.sleep,
which had the side effect of interpreting zero as infinity. However,
for Thread.sleep, zero just means zero. I assume that doesn't mean
"don't sleep at all", though, or else the app wouldn't have called
Thread.sleep in the first place, so this patch sleeps for one
millisecond when zero is passed -- just enough to yield the processor
for a bit. Thread.yield might be a better choice in this case, but I
assume the app would have called that directly if that's what it
wanted.
2012-08-12 11:17:59 -06:00
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
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
Joshua Warner
fffde5f445
add Arrays test for equals and hashCode, handle corner cases with null
2012-07-24 11:31:47 -06:00
Joel Dice
af34259a01
Merge branch 'master' of https://github.com/joshuawarner32/avian
2012-07-24 10:21:37 -06:00
Joshua Warner
b034d11221
Ungenerify Arrays.{hashCode|equals}, make Arrays.equals consider nulls equal
2012-07-24 10:03:19 -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
Joshua Warner
62ff8440ed
implement Arrays.equals and Arrays.hashCode
2012-07-23 07:28:05 -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