Commit Graph

3112 Commits

Author SHA1 Message Date
Seth Goings
6e6ee31128 Update .travis.yml 2013-01-07 11:37:01 -07:00
Seth Goings
548a40ea3a Update .travis.yml
Use make to build this project in Travis instead of the Java default
2013-01-07 11:36:34 -07:00
Terek Campbell
d53920a188 Edit README.md to work with ReadyTalk's Travis CI 2013-01-07 10:57:50 -07:00
Terek Campbell
3fcb15edca Merge branch 'master' of https://github.com/terekcampbell/avian 2013-01-07 09:40:20 -07:00
Terek Campbell
ff08a658fe Further changes to travis.yml 2013-01-07 09:39:25 -07:00
terekcampbell
3010aa13a5 Updated README for Travis CI 2013-01-07 09:38:02 -07:00
Terek Campbell
ab0310d781 Added the travis.yml file 2013-01-07 09:29:31 -07:00
Terek Campbell
7caa479084 Deleted the old readme.txt file 2013-01-04 16:45:47 -07:00
Terek Campbell
cca7ade32e Changed the readme file to a Markdown file 2013-01-04 16:42:11 -07:00
terekcampbell
dfbc34c3a4 Will now look pretty when converted to .md 2013-01-04 16:09:54 -07:00
terekcampbell
ccbe01c16a Edit the top 2013-01-04 14:03:15 -07:00
Joel Dice
e8f560895b preserve sun.misc.Launcher.getLauncher in openjdk.pro
The VM calls this method when booting, so we need to tell ProGuard to
retain it.
2012-12-31 11:56:35 -07:00
Joel Dice
dd685de6e6 add extra empty line before heading in readme.txt
This makes it consistent with the other headings.
2012-12-31 11:07:26 -07:00
Joel Dice
a37fbdaa29 Merge remote-tracking branch 'mkeesey/master' 2012-12-31 08:39:32 -07:00
Seth Goings
a0cd542fcf Update readme.txt 2012-12-26 15:30:45 -07:00
Mike Keesey
5061d7fe4d Making Thread's isInterrupted() non-static and make it use the current instance's interrupted variable. 2012-12-25 18:12:03 -07:00
Carsten Elton Sørensen
cad4719f7d Handle null pointer in PopLocalFrame 2012-12-21 09:38:03 -07:00
Carsten Elton Sorensen
887a32bc10 Added some members that should not be removed or renamed 2012-12-21 14:18:41 +01:00
Joel Dice
9f22a701cc load libmawt.so proactively when booting the VM for OpenJDK
This library is placed in the xawt subdirectory of jre/lib/$arch on
POSIX systems, so it isn't found automatically when third-party
libraries which depend on it are loaded.  The simplest way to ensure
that it's found seems to be to just load it when the VM starts up.
2012-12-20 12:30:15 -07:00
Joel Dice
b75497c8ff implement JNIEnv::NewLocalRef 2012-12-20 09:05:30 -07:00
Joel Dice
1094483a7c fix 32-bit build regression 2012-12-19 16:48:20 -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
7b07b5b9a3 print more of the stack map when DebugFrameMaps is enabled 2012-12-12 16:04:26 -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
f79f320859 fix MSVC build regression 2012-12-05 17:17:29 -07:00
Joel Dice
36aa74316a fix Windows cross-compile build 2012-12-04 17:37:02 -07:00
Joel Dice
2659e32b80 Merge remote-tracking branch 'csoren/master' 2012-12-04 14:04:57 -07:00
Stanisław Szymczyk
de1f5c7b9f fix pthread mutex and condition leak
Hi,

I did some more tests with my x86 QNX Avian port and found one major problem
in Avian VM while trying to run Apache Ivy. The problem manifests as
follows:

1. MySystem::Thread X is created, during its creation pthread mutex and
conditional variable are initialized
2. Program runs for some time
3. MySystem Thread X is disposed, it's memory is freed (during garbage
collection I guess)
4. Program runs for some time
5. MySystem::Thread Y is created in exactly the same memory address as
MySystem::Thread X disposed in step 3 (I suppose that's due to the way
memory allocator works in Avian)
6. During MySystem::Thread Y creation pthread mutex and conditional variable
initialization fail silently with EBUSY. QNX documentation says it means
"The given mutex was previously initialized and hasn't been destroyed."
which is correct, because it's exactly in the same memory address as mutex
and conditional variable of MySystem::Thread X and they haven't been
destroyed during MySystem::Thread X disposal

Fortunately solution for this is easy, see the attached patch. Now Apache
Ivy works without any problems.

Regards,
Stanisław Szymczyk
2012-12-04 10:14:44 -07:00
Carsten Elton Sorensen
2b44fb6b93 Compile fix for GCC 4.7.2 in C++11 mode 2012-11-30 11:14:35 +01:00
Carsten Elton Sorensen
859f0ec503 Fix for C++ compile error 2012-11-30 11:08:54 +01:00
unknown
7cea3dbe48 Merge branch 'master' of git://github.com/ReadyTalk/avian 2012-11-30 11:06:52 +01:00
Carsten Elton Sorensen
571cc6a85e Added new embed utility for Windows 2012-11-13 09:11:49 +01:00
Mike Keesey
e4dfb79618 Merge pull request #20 from csoren/master
A simple fix to accept upper case size suffixes for the -Xm parameters
2012-11-12 18:26:15 -08:00
Carsten Elton Sørensen
53b1a2423a Accept M and K suffixes for memory sizes like the java command 2012-11-12 22:35:58 +01:00
Mike Keesey
4c6155951d Merge pull request #19 from pcarrier/classpath
classpath: java.nio.ByteOrder
2012-11-11 19:24:43 -08:00
Pierre Carrier
74b070f9cc classpath: java.nio.ByteOrder
Used by jruby.
(Not saying I'm gonna implement String.format :)
2012-11-11 06:06:18 +01:00
Pierre Carrier
f8ea506021 classpath: j.l.{Integer,Long}.to{Octal,Binary}String
Offer support for toOctalString and toBinaryString in Integer and Long.
2012-11-05 00:10:02 +01:00
Pierre Carrier
be952acbcb classpath: Closeable & Flushable 2012-11-04 02:14:17 +01:00
Joshua Warner
33fed1b710 Merge branch 'master' of github.com:ReadyTalk/avian 2012-10-30 14:00:16 -06:00
Joshua Warner
4c20465294 add basic URLClassLoader implementation 2012-10-30 09:34:16 -06:00
Joel Dice
be12db20cb preserve all methods in avian.OpenJDK from removal in openjdk.pro
OpenJDK.getDeclaringClass is called from JVM_GetDeclaringClass, so we
need to tell ProGuard to preserve it along with the other method we
had already included.
2012-10-16 08:33:35 -06:00
Joel Dice
3665753d1f fix MSVC build regression 2012-10-13 13:09:24 -06:00
Joel Dice
8f308291b0 eliminate call stack recursion in compile method
Some OSes (notably, Windows CE) restrict the size of the call stack
such that recursive compilation of branch instructions can lead to
stack overflow in methods with large numbers of such instructions.  In
fact, a worst-case method could even lead to overflow when the stack
size limit is relatively generous.

The solution is to convert this recursion into iteration with an
explicit stack to maintain state about alternate paths through each
branch.
2012-10-13 09:46:12 -06:00
Joel Dice
3e0ab35ba1 fix PersistentSet.remove side-effect bug
The whole point of PersistentSet is to provide non-destructive write
operations, which means the add and remove methods should have no
effect on previous revisions.  However, a bug in remove caused shared
tree nodes to be modified, corrupting any revisions with which they
were shared.
2012-10-13 09:39:14 -06:00
Joel Dice
a3c4b60f43 rename package avian.avian_vm_resource to avian.avianvmresource
This package name must match the URL protocol we use for loading
embedded resources, but OpenJDK's URL class won't tolerate underscores
in a protocol name.  Also, I had not updated the names of the native
methods in avian.avianvmresource.Handler, leading to
UnsatisfiedLinkErrors when they were called.
2012-10-06 15:33:24 -06:00
Joel Dice
7946aaf48f update static table mapping code in bootimage.cpp to match machine.cpp
Commit c918cbc added a reference to ensure
sun.misc.Unsafe.getLongVolatile could be implemented efficiently on
32-bit platforms, but I forgot to update bootimage.cpp to account for
it.
2012-10-06 15:30:59 -06:00
Joel Dice
3a452309b3 update static table class reference in updateClassTables
Commit c918cbc added this reference to ensure
sun.misc.Unsafe.getLongVolatile could be implemented efficiently on
32-bit platforms.  However, I neglected to ensure the reference was
updated to point to the final class instance instead of the temporary
one used in parseClass.  This led to extra memory usage and
inconsistent locking behavior, plus broken bootimage builds.
2012-10-06 15:25:12 -06:00
Joel Dice
45073db421 fix Call[Static]<type>MethodA float argument marshalling 2012-10-05 10:56:07 -06:00
Joel Dice
f8d3494b1c clear any weak/soft/phantom references to finalizable objects before queuing
If we don't clear these references, we risk finalizing objects which
can still be reached by one of the special reference types.

It's a bit of a chicken-and-egg problem.  We need to visit finalizable
objects before visiting weak references, since some of the weak
references and/or their targets may become reachable once the
finalizable objects are visited.  However, that ordering means we have
no efficient way of distinguishing between objects which are reachable
from one or more normal GC roots and those which are only reachable
via the finalization queue.  The solution is to clear all weak
references to finalizable objects before visiting them.
2012-10-05 10:06:01 -06:00
Joel Dice
c680dd4215 use ldmneia on Clang < 4 and GCC, ldmiane on Clang >= 4
I don't know why this instruction was renamed, but we have to deal
with it.
2012-10-03 17:01:00 -06:00