Commit Graph

3138 Commits

Author SHA1 Message Date
Carsten Elton Sorensen
5b051f5138 Merge remote-tracking branch 'readytalk/master' 2013-02-05 07:56:14 +01:00
Simon Ochsenreither
57a67fb312 Fix field names, add getters to j.l.Package 2013-02-04 14:14:45 +01:00
Joel Dice
5dcf6eae5a fix GC safety issue in MyClasspath::updatePackageMap 2013-02-03 20:29:24 -07:00
Joel Dice
e8f8ebdc67 fail quickly if an object allocation cannot be satisfied
Previously, we would blithely exceed the heap ceiling and force the
next allocation to deal with the problem, including a major GC and
possible OutOfMemoryError.  As of this commit, we throw an error
immediately if we find that the allocation will push us over the
ceiling.
2013-02-03 15:53:36 -07:00
Joel Dice
23bb2e8743 force a GC in allocate3 if the heap limit has been exceeded
Otherwise, we'll throw an OOME even though there may be enough
unreachable objects eligible for collection to get back below the
limit.
2013-02-03 15:20:53 -07:00
Joel Dice
3db9e73aa1 fix GC safety issues in classpath-openjdk.cpp 2013-02-03 15:19:35 -07:00
Joel Dice
80c8940b7f ensure joining threads are always notified when a thread exits
Previously, we'd only do this if the thread exited without throwing an
exception.  Now we do it regardless.
2013-02-03 15:18:32 -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
Simon Ochsenreither
1db67e463f Add Class#isEnum and improve error handling in Enum.valueOf 2013-02-03 16:03:15 +01:00
Simon Ochsenreither
b1eb4b9718 Adds code to get the Scala REPL working 2013-01-30 04:31:38 +01:00
Joel Dice
0c5471d25e remove temporary #error used for debugging
Sorry, that wasn't supposed to be checked in.
2013-01-28 16:24:08 -07:00
Joel Dice
67fd707254 fix handling of unusual exception handler layout
Scala sometimes generates bytecode such that the scope of an exception
handler starts at another exception handler, e.g.:

      Exception table:
         from    to  target type
           290   372   382   any
           382   451   451   any
           290   372   451   any

Avian's compiler was incorrectly initializing the stack frame for the
second handler in this case.  This commit fixes the problem.
2013-01-26 22:06:53 -07:00
Joel Dice
75f5921b3e revert accidental makefile change 2013-01-26 20:07:18 -07:00
Joel Dice
dec2095c63 fix openjdk bootimage cross builds
We need to extract the OpenJDK classes into the build classpath
directory for the target platform before running the
bootimage-generator, or else it won't be able to find the classes.
2013-01-26 18:01:34 -07:00
Joel Dice
70a7a50a49 fix int-to-long conversions from memory on x86_32
The instruction for 32-bit-to-64-bit sign extension on x86_32 requires
that the input value be placed in EAX and the sign extension in EDX.
However, the compiler can get confused if the input value is in memory
addressed via one of those registers and doesn't know how to move it.
This patch works around that limitation by doing the move explicitly
in MemoryEvent::compile if necessary.
2013-01-26 17:15:15 -07:00
Joel Dice
1a44ec9eef fix incorrect macro name in bootimage.cpp 2013-01-25 16:47:31 -07:00
Joel Dice
2131adf3aa fix Windows OpenJDK build 2013-01-25 08:07:47 -07:00
Joel Dice
844520a402 fix embed.cpp build for 64-bit Windows 2013-01-25 07:57:57 -07:00
Joel Dice
36eee724c9 check argument types in JVM_InvokeMethod
Method.invoke must throw an IllegalArgumentException if it receives
the wrong number or types of arguments, and since this isn't done by
the OpenJDK class library, we must do it in the VM.
2013-01-24 12:16:41 -07:00
Joel Dice
0adccdc99c return unadorned filename from JVM_GetSystemPackage
Package.defineSystemPackage expects a filename, not a URL.
2013-01-24 12:16:40 -07:00
Joel Dice
2a45a5919c return XToolkit from iOS getPreferredToolkit stub
This is necessary to prevent an NPE in Hashtable.put when
System.initProperites tries to put a null value in the map for
java.awt.graphicsenv.
2013-01-19 14:10:31 -07:00
Joel Dice
ccbdd6723a specify CodeCapacity based on target arch, not build arch 2013-01-19 14:08:07 -07:00
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
Carsten Elton Sørensen
5f66f73961 Handle null pointer in PopLocalFrame 2012-12-21 09:56:21 +01:00
Carsten Elton Sørensen
6e7a584060 Merge remote-tracking branch 'readytalk/master' into jni 2012-12-21 08:59:22 +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
Carsten Elton Sørensen
4a98b6ac13 Fixed compiler error casts 2012-12-20 08:52:05 +01:00
Joel Dice
1094483a7c fix 32-bit build regression 2012-12-19 16:48:20 -07:00
Carsten Elton Sørensen
5d36fd84cd Changed reinterpret_cast to static_cast 2012-12-19 23:08:50 +01: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