Commit Graph

423 Commits

Author SHA1 Message Date
Joshua Warner
db2a701cf5 Merge pull request #122 from dicej/master
fix various Android test suite regressions and add more reflection tests
2013-12-06 18:40:39 -08:00
Joshua Warner
0a4eff33b2 fix jdk-test failures 2013-12-06 19:30:04 -07:00
Joel Dice
7056315c18 fix various Android test suite regressions and add more reflection tests
Most of these regressions were simply due to testing a lot more stuff,
esp. annotations and reflection, revealing holes in the Android
compatibility code.  There are still some holes, but at least the
suite is passing (except for a fragile test in Serialize.java which I
will open an issue for).

Sorry this is such a big commit; there was more to address than I
initially expected.
2013-12-06 18:48:47 -07:00
Johannes Schindelin
ddd057c53a Do not test java.util.TreeMap's serialization in the Serialize test
In the Android class path, TreeMap is implemented differently and as a
consequence its serialization is incompatible with OpenJDK's. So let's
test a private static class' serialization instead, to make sure that
the wire protocol defined by the Java Language Specification is
implemented.

This addresses issue #123 reported by Joel Dice.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-06 19:24:41 -06:00
Joshua Warner
47a7732a81 add jdk-test target, and fix failures
The intent of this target is to run our test suite against the installed jre.
This should help prevent our VM from diverging in implementation from the jdk.

The remainder of this commit fixes the problems that this exposes.
2013-12-06 15:00:02 -07:00
Johannes Schindelin
d8d980be9a Fix the look-behind test for OpenJDK
OpenJDK's regex engine can only handle look-behinds of limited sizes.
So let's just test for that, not the unbounded one we had before (that
our own regex engine handles quite fine, though).

This fixes issue #115.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-06 10:50:34 -06:00
Joel Dice
abe8bc6fda fix exception wrapping for Method.invoke and static initializers
Method.invoke should initialize its class before invoking the method,
throwing an ExceptionInInitializerError if it fails, without wrapping
said error in an InvocationTargetException.

Also, we must initialize ExceptionInInitializerError.exception when
throwing instances from the VM, since OpenJDK's
ExceptionInInitializerError.getCause uses the exception field, not the
cause field.
2013-12-05 22:28:13 -07:00
Joshua Warner
8cda2446d5 implement sun.misc.Unsafe.throwException 2013-12-05 20:28:08 -07:00
Joel Dice
2000c139ea modify TreeSet.MyIterator to support both ascending and descending iteration
This also fixes a bug such that the remove() method left the iterator
in an inconsistent state.
2013-12-04 17:52:27 -07:00
Joshua Warner
fe9ac94629 Merge pull request #105 from dscho/regex
Support (the most common subset of) regular expressions
2013-12-04 11:57:26 -08:00
Joshua Warner
a90100ee32 Merge pull request #112 from dscho/get-generic-type
Support Field#getGenericType()
2013-12-04 11:22:49 -08:00
Johannes Schindelin
6626b477ad Replace java.util.regex.* with the new regular expression engine
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-04 12:52:03 -06:00
Johannes Schindelin
e96379ee19 Regex: document the strengths and limitations
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-04 12:52:02 -06:00
Johannes Schindelin
9e7169fe34 Regex: let toString() in the Compiler reconstruct the regex
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-04 12:52:02 -06:00
Johannes Schindelin
c975e25864 Regex: implement counted quantifiers: {<n>,<m>}
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-04 12:52:02 -06:00
Johannes Schindelin
2d83622975 Implement Field#getGenericType()
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 16:48:40 -06:00
Johannes Schindelin
0eb2d55da2 Class#getDeclaredClasses(): exclude inner classes of inner classes
Inner classes can have inner classes, but getDeclaredClasses() is
supposed to list *only* the immediate inner classes.

Example: if class Reflection contains a class Hello that contains
a class World, Reflection.class.getDeclaredClasses() must not
include World in its result.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 16:48:40 -06:00
Johannes Schindelin
fb6486e276 Regex: implement ^,$,\b and \B
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:11 -06:00
Johannes Schindelin
fe32cce2ad Regex: support intersection/union of character classes
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:11 -06:00
Johannes Schindelin
b4c768b101 Regex: Test Pattern#split(String)
The particular pattern we use to test it is used in ImgLib2, based on
this answer on stackoverflow:

	http://stackoverflow.com/a/279337

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:11 -06:00
Johannes Schindelin
8ab10a6953 Regex: support special character classes
This adds support for character classes such as \d or \W, leaving \p{...}
style character classes as an exercise for later.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:11 -06:00
Johannes Schindelin
098f688cd8 Regex: implement negative look-arounds
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:11 -06:00
Johannes Schindelin
8b611c8075 Regex: support look-behind patterns
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:11 -06:00
Johannes Schindelin
62d1964779 Regex: add a method to reverse the PikeVM program
A program for the PikeVM corresponds to a regular expression pattern. The
program matches the character sequence in left-to-right order. However,
for look-behind expressions, we will want to match the character sequence
backwards.

To this end, it is nice that regular expression patterns can be reversed
in a straight-forward manner. However, it would be nice if we could avoid
multiple parsing passes and simply parse even look-behind expressions as
if they were look-ahead ones, and then simply reverse the program for that
part.

Happily, it is not difficult to reverse the program so it is equivalent to
matching the pattern backwards.

There is one catch, though. Imagine matching the sequence "a" against the
regular expression "(a?)a?". If we match forward, the group will match the
letter "a", when matching backwards, it will match the empty string. So,
while the reverse pattern is equivalent to the forward pattern in terms of
"does the pattern match that sequence", but not its sub-matches. For that
reason, Java simply ignores capturing groups in look-behind patterns (and
for consistency, the same holds for look-ahead patterns).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:11 -06:00
Johannes Schindelin
85af36ef90 Regex: support lookaheads
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:11 -06:00
Johannes Schindelin
d4a2f58eb5 Regex: implement alternatives
Now we support regular expressions like 'A|B|C'.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:11 -06:00
Johannes Schindelin
c3a06a600a Regex: implement non-capturing groups
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:11 -06:00
Johannes Schindelin
53563c4f8e Regex: add support for character classes
Now we support regular expression patterns a la '[0-9]'.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:11 -06:00
Johannes Schindelin
ca428c406c Regex: implement find()
Now that we have non-greedy repeats, we can implement the find() (which
essentially prefixes the regular expression pattern with '.*?'.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:11 -06:00
Johannes Schindelin
7da03b0f19 Regex: Implement reluctant '?', '*' and '+'
Now that we have reluctant quantifiers, we can get rid of the hardcoded
program for the challenging regular expression pattern.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:11 -06:00
Johannes Schindelin
f979505b3d Regex: implement * and + operators
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:10 -06:00
Johannes Schindelin
d753edafcd Regex: support the dot
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:10 -06:00
Johannes Schindelin
e2105670a0 Regex compiler: fall back to TrivialPattern when possible
While at it, let's get rid of the unescaping in TrivialPattern which was
buggy anyway: special operators such as \b were misinterpreted as trivial
patterns.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:10 -06:00
Johannes Schindelin
04d8955f98 Regex: Implement compiler for regular expression patterns
Originally, this developer wanted to (ab)use the PikeVM with a
hand-crafted program and an added "callback" opcode to parse the regular
expressions.

However, this turned out to be completely unnecessary: there are no
ambiguities in regular expression patterns, so there is no need to do
anything else than parse the pattern, one character at a time, into a
nested expression that then knows how to write itself into a program for
the PikeVM.

For the moment, we still hardcode the program for the regular expression
pattern demonstrating the challenge with the prioritized threads because
the compiler cannot yet parse reluctant operators.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:10 -06:00
Johannes Schindelin
26c4bf8d8b Regex: add a class for matching character classes
This will be used to match character classes (such as '[0-9a-f]'),
but it will also be used by the regular expression pattern compiler
to determine whether a character has special meaning in regular
expressions.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:10 -06:00
Johannes Schindelin
d00f799d2e Regex: special-case a(a*?)(a?)(a??)(a+)(a*)a
Among other challenges, this regular expression is designed to demonstrate
that thread prioritization is finicky: Given the string 'aaaaaa' to match,
the first four threads will try to grab the second 'a', the third thread
(the one that matched the '(a??)' group) having scheduled the same
instruction pointer to the '(a+)' group that the second -- higher-priority
-- thread will try to advance to only after processing the '(a??)' group's
SPLIT. The second thread must override the third thread in that case,
essentially stopping the latter.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:10 -06:00
Johannes Schindelin
edb48ffec2 Regex: support prioritized threads
If we want to match greedy or reluctant regular expressions, we have
to make sure that certain threads are split off with a higher priority
than others. We will use the ThreadQueues' natural order as priority
order: high to low.

To support splitting into different-priority threads, let's introduce
a second SPLIT opcode: SPLIT_JMP. The latter prefers to jump while the
former prefers to execute the opcode directly after the SPLIT opcode.

There is a subtle challenge here, though: let's assume that there are
two current threads and the higher-priority one wants to jump where
the lower-priority one is already. In the PikeVM implementation
before this change, queueImmediately() would see that there is
already a thread queued for that program counter and *not* queue the
higher-priority one.

Example: when matching the pattern '(a?)(a??)(a?)' against the string
'aa', after the first character, the first (high priority) thread
will have matched the first group while the second thread matched the
second group. In the following step, therefore, the first thread will
want to SPLIT_JMP to match the final 'a' to the third group but the
second thread already queued that program counter.

The proposed solution is to introduce a third thread queue: 'queued'.
When queuing threads to be executed after reading the next character
from the string to match, they are not directly queued into 'next' but
into 'queued'. Every thread requiring immediate execution (i.e. before
reading the next character) will be queued into 'current'. Whenever
'current' is drained, the next thread from 'queued' that has not been
queued to 'current' yet will be executed.

That way, we can guarantee that 1) no lower-priority thread can override
a higher-priority thread and 2) infinite loop are prevented.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:10 -06:00
Johannes Schindelin
63b06ebde8 Regex: optimize matching characters
Instead of having an opcode 'CHAR', let's have the opcodes that fall
within the range of a char *be* the opcode 'match this character'.

While at it, break the ranges of the different types of opcodes apart
into ranges so that related operations are clustered.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:10 -06:00
Johannes Schindelin
b03283033e Add a unit test for the regular expression engine
We still do not parse the regular expression patterns, but we can at
least test that the hardcoded 'a(bb)+a' works as expected.

This class will be extended as we support more and more features.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:10 -06:00
Johannes Schindelin
2073d4bffb Prepare the Matcher class for multiple groups
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:10 -06:00
Johannes Schindelin
e6ad10de04 Implement Pattern / Matcher classes based on the PikeVM
Based on the just-implemented PikeVM, let's test it with a specific
regular expression. At this point, no parsing is implemented but instead
an explicit program executing a(bb)?a is hardcoded.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:10 -06:00
Johannes Schindelin
944f5f3567 Start implementing a regular expression engine
So far, these are humble beginnings indeed. Based on the descriptions of

	http://swtch.com/%7Ersc/regexp/regexp2.html

I started implementing a Thompson NFA / Pike VM.

The idea being that eventually, regular expressions are to be compiled
into special-purpose bytecode for the Pike VM that executes a varying
number of threads in lock-step over each character of the text to match.

The thread count is bounded by the length of the program: two different
threads with identical instruction pointer at the same character-to-match
would yield exactly the same outcome (and therefore, we can execute just
one such thread instead of possibly many).

To allow for matching groups, each thread carries a state with it, saving
the group offsets acquired so far.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:10 -06:00
Johannes Schindelin
84829dc390 Refactor Pattern / Matcher classes
This makes both the Pattern and the Matcher class abstract so that more
specialized patterns than the trivial patterns we support so far can be
implemented as convenient subclasses of the respective abstract base
classes.

To ease development, we work on copies in test/regex/ in the 'regex'
package. That way, it can be developed in Eclipse (because it does not
interfere with Oracle JRE's java.util.regex.* classes).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-12-03 12:28:10 -06:00
Joshua Warner
c3e3447c62 Merge pull request #107 from dscho/temp-file
Delete temporary test file afterwards
2013-12-02 19:54:38 -08:00
Mike Jensen
a2e1e1eec9 Merge pull request #102 from dscho/proxy-annotations
This looks good to me, good work.
2013-12-02 09:13:01 -08:00
Johannes Schindelin
0681531dc0 Test complicated annotation constructs
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-11-27 10:39:28 -06:00
Johannes Schindelin
6c57bd9174 Verify that Proxy instances have access to annotations' default values
For quick access, the sezpoz library stores lists in
META-INF/annotations/ of classes that have been annotated in a
special way.

To support the use case where the annotations actually changed since
sezpoz stored said lists, sezpoz then creates proxy instances for the
annotations to provide some backwards compatibility: as long as there
are default values for any newly-introduced annotation values,
everything is groovy.

Therefore, let's make sure that proxy instances inherit the
annotations' default values.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-11-27 10:39:28 -06:00
Johannes Schindelin
7d7aaa003e Delete temporary test file afterwards
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-11-26 16:05:14 -06:00
Joshua Warner
c3bbe555be make Sockets test Java6-compilable, make it more generic, and move it to 'extra' 2013-11-08 10:05:53 -07:00
Ilya Mizus
45ee25f68c Implement socket API 2013-11-08 09:55:43 -07:00
Joshua Warner
fd81e126ef fix Dates test for openjdk and stub out java.util.TimeZone 2013-11-07 20:44:02 -07:00
Joshua Warner
76b0bb4872 remove non-conforming ZipEntry.getJavaTime API and associated tests (which failed the openjdk build) 2013-11-07 19:13:13 -07:00
Joshua Warner
dd460ab55e Merge pull request #99 from dscho/fix-get-annotation
Fix NPE in Field#getAnnotation
2013-11-06 09:03:45 -08:00
Joshua Warner
4cf3d9de88 Merge pull request #95 from dscho/compatible-serialization
Java-compatible (de)serialization of TreeMap, ArrayList and Number
2013-11-06 09:02:12 -08:00
Joshua Warner
d0d4f600dc Merge pull request #94 from dscho/serialization
Implement Java-compatible serialization
2013-11-06 08:49:14 -08:00
Johannes Schindelin
ff50034206 Fix NPE in Field#getAnnotation
When the class whose field is to be inspected has no annotations at all,
at least my javac here (1.6.0_51 on MacOSX) does not produce any class
addendum.

Therefore, let's verify that the addendum is not null before proceeding.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-11-06 09:46:56 -06:00
Johannes Schindelin
dddd9e5016 Serialize test: augment the hexdump with address and ASCII dump
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-11-06 09:12:18 -06:00
Johannes Schindelin
7e72f4362b Add a test to ensure TreeMap's (de)serialization compatibility with OpenJDK
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-11-06 09:12:18 -06:00
Johannes Schindelin
48e0912ad4 Test the new, Java-compatible (de)serialization
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-11-06 09:10:51 -06:00
Johannes Schindelin
6159f5cd3c Support Logger#log(Level,String,Object)
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-11-06 09:07:58 -06:00
Johannes Schindelin
dba8d39e63 Implement Class#getDeclaredClasses
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-11-06 09:07:58 -06:00
Joshua Warner
da69b735f4 Merge branch 'addzip' of git://github.com/CUBoulderBoy/avian into CUBoulderBoy-addzip 2013-11-04 17:38:27 -07:00
Joshua Warner
d128838617 Merge pull request #92 from dscho/collections
Various improvements regarding Collections
2013-11-04 16:33:06 -08:00
Joshua Warner
ac32e0de39 Merge pull request #91 from dscho/intro-sort
Replace Arrays.sort() with an efficient sort algorithm
2013-11-04 16:31:08 -08:00
Johannes Schindelin
a2feec0bab Add a pseudo-integration test for getResources()
This adds an extra class path element to the VM running the unit tests,
writes files with identical file names into both directories and then
verifies that SystemClassLoader#getResources can find them.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-11-04 16:53:02 -06:00
Johannes Schindelin
6a81623690 Implement the Arrays#copyOf family
... as introduced in Java 6.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-11-04 15:11:00 -06:00
Johannes Schindelin
d37b5ada37 Implement Collections#sort
This is really a verbatim translation of Arrays#sort.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-11-04 12:08:22 -06:00
Johannes Schindelin
605701e40a Replace Arrays.sort() with an efficient sort algorithm
This change reuses the existing insertion sort (which was previously what
Arrays.sort() executed) in a full intro sort pipeline.

The implementation is based on the Musser paper on intro sort (Musser,
David R. "Introspective sorting and selection algorithms." Softw., Pract.
Exper. 27.8 (1997): 983-993.) and Wikipedia's current description of the
heap sort: http://en.wikipedia.org/wiki/Heapsort.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-11-04 00:27:04 -06:00
Johannes Schindelin
95fcc9ac8e Test the newly-introduced Integer#decode method
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-10-25 15:32:33 -05:00
Johannes Schindelin
c1ec6020a6 Verify that String#lastIndexOf handles large fromIndex correctly
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-10-25 15:32:33 -05:00
Johannes Schindelin
6f64e3aaab Verify that two-dimensional object arrays have the correct component type
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-10-25 15:32:33 -05:00
Joshua Warner
b20dcd268c Merge pull request #85 from dscho/simple-regex
Simple regex
2013-10-21 13:30:57 -07:00
Johannes Schindelin
359f99c0f7 Add a unit test for regular expressions
We do not really support regular expressions yet, but we do support
trivial patterns including ones with escaped characters. Let's make sure
that that works as advertised.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-10-21 13:34:33 -05:00
Johannes Schindelin
db99aada94 Test date parsing/formatting
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-10-21 10:41:40 -05:00
Johannes Schindelin
974073ed17 Make sure to test java.io.File#lastModified
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-10-17 14:30:41 -05:00
Mike Jensen
2e921b803d Added a simple test to show the original issue 2013-07-17 11:53:35 -06:00
Chris Jordan
2d89826ec7 zipentry test 2013-07-08 16:46:00 -06:00
Riley Moses
08d441a905 Add tests for creating zip files using both write methods 2013-07-08 14:50:17 -06:00
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