Commit Graph

280 Commits

Author SHA1 Message Date
1890e348fb fix handling of classe, method, and field names with non-ASCII characters 2013-02-03 14:10:47 -07:00
b75497c8ff implement JNIEnv::NewLocalRef 2012-12-20 09:05:30 -07:00
d200019d10 implement JNI reflection methods
These include FromReflectedMethod, ToReflectedMethod,
FromReflectedField, and ToReflectedField.
2012-12-19 12:39:33 -07:00
663d8da975 fix stack mapping bug for try blocks containing jsr/ret instructions
In order to calculate the initial stack map of GC roots for an
exception handler, we do a logical "and" of maps across all the
instructions contained in the try block for that handler.  This is
complicated by the presence of jsr/ret instructions, though, because
instructions in a subroutine may have multiple maps associated with
them corresponding to all the paths from which execution might flow to
them.

The bug in this case was that we were using an uninitialized map in
our calculation, resulting in a map with no GC roots at all.  By the
time the map was initialized, the damage had already been done.  The
solution is to treat an uninitialized map as if it has roots at all
positions so that it has no effect on the calculation until it has
been initialized with real data.
2012-12-12 15:54:15 -07:00
45073db421 fix Call[Static]<type>MethodA float argument marshalling 2012-10-05 10:56:07 -06:00
24f682f5b6 fix 64-bit shifts on x86_32 (part 2)
My earlier attempt (fa5d76b) missed an important detail, and somehow I
forgot to test the 32-bit OpenJDK build which made that omission
obvious.  Here's the fix.
2012-09-03 08:44:13 -06:00
fa5d76b43e fix 64-bit shifts on x86_32 2012-08-13 08:26:39 -06:00
a3a816c9a4 remove test of DataOutputStream from Integers.java
We haven't implemented that class yet, so the test only compiles with
the OpenJDK port.
2012-08-12 20:58:07 -06:00
69ffa28e1b fix shift instruction implementations on ARM
Unlike x86, ARM does not implicitly mask the shift value, so we must
do so explicitly.
2012-08-11 19:09:03 +00:00
2687333a37 Merge remote-tracking branch 'github/master' 2012-08-12 15:03:40 -06:00
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
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
373a92d4d6 add Buffers test 2012-08-11 08:01:44 -06:00
01be4b23bb implement JNI methods needed by AWT
These include PushLocalFrame, PopLocalFrame, NewDirectByteBuffer,
GetDirectBufferAddress, and GetDirectBufferCapacity.
2012-08-11 06:56:19 -06:00
96d5dae06c specify UTF-8 explicitly in Strings.testDecode
This fixes a test failure with the OpenJDK port.
2012-08-04 18:41:44 -06:00
c63668c1ce fix ArrayIndexOutOfBoundsException when decoding a UTF-8 stream 2012-08-04 16:11:27 -06:00
5a09774353 tests don't compile when building with OpenJDK
I get this error when compiling with "make openjdk=...." on both x86_64 and
arm:

compiling test classes
test/Arrays.java:90: error: reference to equals is ambiguous, both method
equals(float[],float[]) in Arrays and method equals(Object[],Object[]) in
Arrays match
      expect(java.util.Arrays.equals(null, null));

test/Arrays.java:95: error: reference to hashCode is ambiguous, both method
hashCode(double[]) in Arrays and method hashCode(Object[]) in Arrays match
      java.util.Arrays.hashCode(null);

The attached patch fixes this.
2012-08-04 07:29:39 -06:00
2cb5a74991 fix mixed marshalling of mixed float/double argument lists on armhf
When we skip a single-precision register to ensure a double-precision
load is aligned, we need to remember that in case we see another
single-precision argument later on, which we must backfill into that
register we skipped according to the ABI.
2012-08-01 16:48:26 +00:00
67ec092e9a add JNI test to test suite 2012-08-01 16:04:12 +00:00
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
2d6bfa5383 Merge github.com:ReadyTalk/avian 2012-07-24 16:17:09 -06:00
de086d1046 fix typo in Arrays test 2012-07-24 11:38:43 -06:00
fffde5f445 add Arrays test for equals and hashCode, handle corner cases with null 2012-07-24 11:31:47 -06:00
9974d91648 implement DatagramChannel.receive and fix Datagrams to be Java 6 compatible 2012-07-10 14:09:14 -06:00
3d99ff37cb Merge remote-tracking branch 'origin/master' into dicej-master 2012-07-09 16:46:21 -06:00
2ab304acb8 Merge github.com:mkeesey/avian 2012-07-07 16:29:18 -06:00
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
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
9c9ee5c26d Made the bulk clear() fast like bulk set() and flip() for BitSet. 2012-07-05 22:16:19 -06:00
5f1b086150 Fixed an off-by-one error when deciding if we should grow BitSets. 2012-07-03 21:28:59 -06:00
c602f4673b implement java.nio.channels.DatagramChannel 2012-07-03 11:24:05 -06:00
6e30366d07 Adding EnumSet, which is backed by a speedy BitSet. 2012-07-02 14:28:51 -06:00
d419899ac1 Adding both forms of flip() to BitSet. 2012-07-02 14:28:40 -06:00
31311160c3 Adding cardinality() to BitSet. 2012-07-02 14:28:34 -06:00
156644b8e5 fix incorrect array sizing in populateMultiArray
We were assuming the array element size was always the native word
size, which is not correct in general for primitive arrays, and this
led to wasted space at best and memory corruption at worst.
2012-06-26 10:43:47 -06:00
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
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
1119675b7a override InputStream.available for FileInputStream and the instance returned by ZipFile.getInputStream 2012-05-04 19:55:53 -06:00
756f58210a add test for sun.misc.Unsafe functionality 2012-03-13 08:28:33 -06:00
4aefa211a3 File.createNewFile should return false if the file already exists 2012-03-13 08:26:51 -06:00
71295e54c7 handle constants larger than 8 bits in subtractBorrowCR 2012-03-11 04:59:42 -06:00
6c9a1e1643 add "throws IOException" to java.io.File.createTempFile 2012-03-11 04:57:22 -06:00
c6ac66e45a fix bug in isAssignableFrom such that primitive array types were considered to be subclasses of the Object array type 2012-02-27 18:16:01 -07:00
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
bbb4529752 implement File.setExecutable(), File.canExecute(), and File.createTempFile() 2012-02-09 14:23:24 -07:00
9ba7c504da Merge remote branch 'origin/SWT3.7_UrlUpdates' into oss-master 2011-12-29 11:00:59 -07:00
51ae790e54 Added UrlTest.java to tests dir 2011-12-29 10:36:33 -07:00
d76191d2bb Adding unit tests for File.isAbsolute() method. 2011-12-29 10:17:01 -07:00
a0c12ad259 Added another floatToIntBits test 2011-12-29 09:51:44 -07:00
f5a168f584 Fixed tests for floatToIntBits. Probably want to add more comprehensive tests tomorrow (or today... as of 2 minutes) 2011-12-28 23:58:33 -07:00