Commit Graph

2173 Commits

Author SHA1 Message Date
Joel Dice
632e50efe6 fix non-continuations ARM build 2010-11-09 02:13:23 +00:00
Joel Dice
0f0427f23b implement continuations support for ARM 2010-11-08 04:18:10 +00:00
Joel Dice
36a8ba28e5 disable debug logging in compile.cpp 2010-11-08 04:15:31 +00:00
Joel Dice
5d5dbd860b fix ARM tails=true build
This requires adding LinkRegister to the list of reserved registers,
since it must be preserved in the thunk code generated by
compileDirectInvoke.  An alternative would be to explicitly preserve
it in that special case, but that would complicate the code quite a
bit.
2010-11-08 00:41:44 +00:00
Joel Dice
cfc09f8fdb Merge commit 'origin/master' into arm 2010-11-07 21:10:41 +00: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
Joel Dice
cf14a2c222 add exception for Object.clone() to vm.pro
Proguard gets confused about clone() and array classes (see
http://sourceforge.net/tracker/index.php?func=detail&aid=2851344&group_id=54750&atid=474704).
2010-10-15 23:06:03 +00:00
Joel Dice
081d2d68ce handle and ignore SIGPIPE on Posix systems
We must handle this signal or we'll get the default behavior of
exiting the process whenever we get an unexpected network
disconnection.
2010-10-14 23:43:35 +00:00
Joel Dice
b3accf1b30 ServerSocketChannel throws IOException, not Exception 2010-10-13 13:38:31 -06:00
Joel Dice
ca251dfa17 print error message on failed dlopen if Verbose is true in posix.cpp 2010-10-13 13:37:09 -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
d5b35bea6e remove redundant import from FileOutput.java 2010-09-12 14:41:01 -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
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
d9e79db062 Merge branch 'master' into arm 2010-09-03 23:26:08 +01:00
jet
a1f5456451 All tests passing for ARM port in JIT mode. 2010-09-03 12:52:11 -06:00
Joel Dice
dd0a696932 handle logical AND with a constant in a single instruction where possible 2010-09-03 18:32:22 +01:00
Joel Dice
e7a48c0fa2 save return address in powerpc.cpp's MyAssembler::saveFrame
We've been getting away with not doing this so far since our Java
calling convention matches the native calling convention concerning
where the return address is saved, so when our thunk calls native code
it gets saved for us automatically.  However, there was still the
danger that a thread would interrupt another thread after the stack
pointer was saved to the thread field but before the native code was
called and try to get a stack trace, at which point it would try to
find the return address relative to that stack pointer and find
garbage instead.  This commit ensures that we save the return address
before saving the stack pointer to avoid such a situation.
2010-09-02 17:28:20 -06:00
Joel Dice
bd01784249 save return address in arm.cpp's MyAssembler::saveFrame
This is necessary to allow safe stack unwinding (e.g. for exception
handling and garbage collection) from native code.
2010-09-03 00:18:19 +01:00
jet
a20d7e028b Longs.java test now progresses further before failure. 2010-09-02 16:09:01 -06:00
jet
b26dd4abf1 All but 6 tests are now passing in JIT mode on ARM. 2010-08-31 18:35:55 -06:00
Joel Dice
a4914daae4 remove unused functions from powerpc.cpp 2010-08-30 16:55:48 -06:00
jet
b6a839950f Nine tests (including float and integer calculations) are now passing. 2010-08-30 16:13:10 -06:00
Joel Dice
56b59cef5c use r6 instead of r0 in popFrameAndUpdateStackAndReturn
This avoids clobbering the return value.
2010-08-30 16:16:02 +01:00
jet
f740570ff6 Further debugging of ARM "Hello World!" JIT functionality. 2010-08-27 18:52:33 -06:00
jet
5c00cfac6f Incomplete debugging of "Hello World!" on ARM. 2010-08-24 17:59:01 -06:00
Joel Dice
bcf7c0639c clarify GNU Classpath build instructions in readme.txt 2010-08-16 09:37:44 -06:00
Joel Dice
7eabe13921 verify file contents in FileOutput test 2010-08-16 09:30:39 -06:00
Joel Dice
be1ba2ccf8 fix gnu build 2010-08-16 09:24:27 -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
fca98df55b fix process=interpret class initialization regression
A long time ago, I refactored the class initialization code in the VM,
but did not notice until today that it had caused the
process=interpret build to break on certain recursive initializations.
In particular, we were not always detecting when a thread recursively
tried to initialize a class it was already in the process of
initializing, leading to the mistaken assumption that another thread
was initializing it and that we should wait until it was done, in
which case we would wait forever.

This commit ensures that we always detect recursive initialization and
short-circuit it.
2010-08-04 18:27:54 -06:00
Joel Dice
064c3b7c33 Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2010-07-30 12:28:30 -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
ddc90ef76e fix 64-bit left shifts with constant shifts greater than or equal to 32
The shiftLeftC function in powerpc.cpp was miscompiling such shifts,
leading to crashes due to illegal instructions and other weirdness due
to instructions that meant something completely different.  This
commit fixes that and adds a test to Longs.java to make sure it stays
fixed.
2010-07-23 10:52:58 -06:00
Joel Dice
4034a219d0 do nothing in System.arraycopy if length <= 0
Previously, we risked segfaults by passing negative numbers to memcpy.

This commit also makes arraycopy throw an IndexOutOfBounds exception
instead of an ArrayStoreException if the specified offsets and lengths
would take us outside the bounds of one or both of the arrays, per the
Sun documentation.
2010-07-13 18:40:29 -06:00
Joel Dice
71972fd1b5 Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2010-07-13 18:03:30 -06:00
Joel Dice
b3da635b63 add java.nio.channels.Channels implementation 2010-07-13 18:03:25 -06:00