Commit Graph

295 Commits

Author SHA1 Message Date
Joel Dice
a098926547 run Shutdown.shutdown on exit when using OpenJDK library
The OpenJDK library wants to track and run the shutdown hooks itself
rather than let the VM do it, so we need to tell it when we're
exiting.

Also, in machine.cpp we need to use only the modifiers specified in
the InnerClasses attribute for inner classes rather than OR them with
the flags given at the top level of the class file.
2013-04-19 13:00:47 -06:00
Joel Dice
81d7786716 fix Class.getModifiers for inner classes and implement JVM_GetDeclaringClass and JVM_GetEnclosingMethodInfo properly
This fixes a couple of tests in the Scala test suite
(run/reflection-modulemirror-toplevel-badpath.scala and
run/reflection-constructormirror-nested-good.scala).
2013-04-17 15:12:58 -06:00
Joel Dice
aa513c2c1d set default file.encoding to UTF-8 in classpath-openjdk.cpp
This default makes more sense than ASCII, which is what it had been.
2013-04-16 19:35:21 -06:00
Joel Dice
b436bd460a fix NaN handling in floating point comparisons 2013-04-03 16:19:33 -06:00
Joel Dice
3497354bbf allow extra flags to be passed to make in ci.sh 2013-03-15 17:48:47 -06:00
Joel Dice
3309a9f4ad ensure that array classes implement Cloneable and Serializable in bootimage build 2013-03-15 13:26:18 -06:00
Joel Dice
96a4b6e508 test non-debug build first in ci.sh
If something's broken, the script will fail faster if we test the
faster build first, giving us quicker feedback.
2013-03-15 13:17:53 -06:00
Joel Dice
c3e34b9438 exit with error code from test.sh if any test fails 2013-03-15 13:17:04 -06:00
Joshua Warner
9327043bc5 Merge branch 'master' into wip
Conflicts:
	makefile
	src/codegen/arm/assembler.cpp
	src/codegen/powerpc/assembler.cpp
	src/codegen/x86/assembler.cpp
2013-02-27 19:27:07 -07:00
Joel Dice
27d7c8a3c0 skip bootimage test in ci.sh if openjdk is set 2013-02-27 13:47:43 -07:00
Joshua Warner
43de16a94d Merge branch 'master' into wip
Conflicts:
	src/bootimage.cpp
2013-02-19 09:13:42 -07:00
Joshua Warner
24c0fab9bf add unit tests for arg parser 2013-02-19 09:06:25 -07:00
Joel Dice
fd0b2b844b test various configurations besides the default in Travis CI 2013-02-16 08:36:41 -07:00
Joshua Warner
33d245d0f7 add unittest framework 2013-02-14 20:54:20 -07:00
Joshua Warner
1258b23ea1 add remote-test capability
To execute tests on a remote host (for instance, because you're cross-compiling),
simply do:

make remote-test=true remote-test-host=<host_to_test_on> test

You can set several variables to control the functionality of remote-test.
See them below, along with their default values:

remote-test-host = localhost # host to ssh to
remote-test-port = 22
remote-test-user = ${USER} # user to execute tests as
remote-test-dir = /tmp/avian-test-${USER} # dir to rsync build output to
2013-02-14 18:47:48 -07:00
Joel Dice
1890e348fb fix handling of classe, method, and field names with non-ASCII characters 2013-02-03 14:10:47 -07:00
Joel Dice
b75497c8ff implement JNIEnv::NewLocalRef 2012-12-20 09:05:30 -07:00
Joel Dice
d200019d10 implement JNI reflection methods
These include FromReflectedMethod, ToReflectedMethod,
FromReflectedField, and ToReflectedField.
2012-12-19 12:39:33 -07:00
Joel Dice
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
Joel Dice
45073db421 fix Call[Static]<type>MethodA float argument marshalling 2012-10-05 10:56:07 -06:00
Joel Dice
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
Joel Dice
fa5d76b43e fix 64-bit shifts on x86_32 2012-08-13 08:26:39 -06:00
Joel Dice
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
Joel Dice
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
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
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
373a92d4d6 add Buffers test 2012-08-11 08:01:44 -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
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
Joel Dice
c63668c1ce fix ArrayIndexOutOfBoundsException when decoding a UTF-8 stream 2012-08-04 16:11:27 -06:00
Damjan Jovanovic
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
Joel Dice
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
Joel Dice
67ec092e9a add JNI test to test suite 2012-08-01 16:04:12 +00: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
2d6bfa5383 Merge github.com:ReadyTalk/avian 2012-07-24 16:17:09 -06:00
Joel Dice
de086d1046 fix typo in Arrays test 2012-07-24 11:38:43 -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
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
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
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
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
Joel Dice
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