Commit Graph

4704 Commits

Author SHA1 Message Date
Mike Hearn
a1fbf282fe Add Proxy, Executable, InvocationHandler, Enum members to openjdk.pro, getProtectionDomain to vm.pro 2017-02-01 14:53:34 +00:00
Joel Dice
8ff5f2a26a Merge pull request #515 from dicej/lambda-fixes-2
initialize MyThread::dynamicTable on thread creation
2016-12-20 09:10:11 -07:00
Joel Dice
2c05d1515e initialize MyThread::dynamicTable on thread creation
Previously, I was lazily initializing this field in addDynamic, but
that only worked if a thread compiles an invokedynamic expression
prior to the first time it executes one, which is not always the case.

This is a bit tricky to write a simple test case for, since it
involves multiple threads, but I've tested it with a big, lambda-heavy
app and it fixes an otherwise consistent crash there.
2016-12-18 19:15:23 -07:00
Joshua Warner
bfc71e3a1e Merge pull request #514 from siepkes/runtime-maxfree-support
Added basic support for the Runtime.maxFree() method.
2016-12-17 11:27:09 -07:00
Jasper Siepkes
c918f2c2e0 Added basic support for the Runtime.maxFree() method. Some applications (BouncyCastle
for example) expect to be able to call this method.
2016-12-16 10:44:11 +01:00
Joel Dice
c545e3dde2 Merge pull request #513 from dicej/lambda-fixes
fix a few memory safety issues
2016-12-07 21:39:16 -07:00
Joel Dice
befa410714 fix jdk-test build 2016-12-07 11:20:43 -07:00
Joel Dice
ca6acb9921 fix a few memory safety issues
The main issue was that offsets for GC roots on the stack were being
miscalculated because invokedynamic bootstrap methods are invoked as
static methods but were not being flagged as such.

Also, I forgot to initialize MyThread::dynamicTable in the constructor
(and why the hell doesn't `gcc -Wall` warn me about stuff like that?)
2016-12-07 10:28:35 -07:00
Joel Dice
c5d7e5b8c5 Merge pull request #511 from dicej/lambda-fixes
Lambda fixes
2016-12-06 09:50:16 -07:00
Joel Dice
678d7debda fix bootimage build
We now detect both metafactory and altMetafactory lambdas when
bootimage-compiling invokedynamic instructions, as well as make
allowance for the same lambda being invoked by multiple invokedynamic
instructions (as is the case for Serializable lambdas).
2016-12-05 17:43:17 -07:00
Joel Dice
138699e203 fix build regression and add copyright headers 2016-12-04 21:27:38 -07:00
Joel Dice
69426b9945 fix some lambda bugs
For lambdas that implement java.io.Serializable, the compiler emits
calls to LambdaMetaFactory.altMetafactory, not
LambdaMetaFactory.metafactory, so I've provided a stub implementation
that ignores that currently ignores the extra parameters it receives.

This also fixes a bug in compiling lambda glue code for lambdas that
take longs and/or doubles.
2016-12-04 21:06:07 -07:00
Joel Dice
a4d9037ae4 fix openjdk-src build with JDK 8 2016-12-04 19:02:30 -07:00
Joel Dice
01e11d8230 Merge pull request #510 from dicej/master
add missing Unsafe calls for recent JDK 7 updates
2016-11-08 17:27:09 -07:00
Joel Dice
8b469195de add missing Unsafe calls for recent JDK 7 updates 2016-11-06 19:16:11 -07:00
Joel Dice
e55c8eb1ff Merge pull request #504 from dicej/windows-patch
wrap Windows-specific code in Inet4AddressImpl.c.8.patch in a preprocessor check
2016-09-27 21:04:10 -06:00
Joel Dice
fb53bf1f42 wrap Windows-specific code in Inet4AddressImpl.c.8.patch in a preprocessor check 2016-09-27 18:09:53 -06:00
Joel Dice
96ed0fda84 Merge pull request #500 from teras/master
Support of latest iOS version
2016-09-21 14:03:32 -06:00
Panayotis Katsaloulis
c105c32453 Support of latest iOS version 2016-09-21 21:00:12 +03:00
Joel Dice
6dddec833b Merge pull request #498 from dicej/travis-trace
disable Trace.java test when running on Travis-CI
2016-09-16 14:27:36 -06:00
Joel Dice
48dc30dd5a disable Trace.java test when running on Travis-CI
Trace.java fails randomly on Travis, but we've never been able to
reproduce or debug the failure elsewhere, so now we skip it if we
detect the suite is running on Travis.
2016-09-16 14:15:15 -06:00
Joel Dice
2a82809a57 Merge pull request #499 from dicej/hostvm-message
print informative message if lambda encountered with no host VM
2016-09-16 14:14:35 -06:00
Joel Dice
650941cdf5 print informative message if lambda encountered with no host VM
Per a recent bug report in the hello-ios project, we found that
bootimage-generator would abort with no explanation if it encountered
a lambda invocation and the `-hostvm` option was unspecified.  This
commit ensures that a helpful message is printed before exiting.
2016-09-16 14:01:00 -06:00
Joshua Warner
cbcc15bf74 Merge pull request #497 from dicej/deflateoutputstream
update ZipOutputStreamTest to use write(byte[]) function as well as others
2016-09-04 15:07:47 +00:00
Joel Dice
81f4d8e92c update ZipOutputStreamTest to use write(byte[]) function as well as others 2016-09-03 14:24:22 -06:00
Joshua Warner
616630f72f Merge pull request #496 from dicej/deflateoutputstream
override write(byte[]) in DeflaterOutputStream
2016-08-25 00:36:45 +00:00
Joel Dice
212e1977aa override write(byte[]) in DeflaterOutputStream
Otherwise, it will inherit the version from FilterOutputStream, which
is not consistent with the write(byte[],int,int) or write(int)
implementations.
2016-08-23 22:39:30 -06:00
Joel Dice
a2c0319af2 Merge pull request #495 from joshuawarner32/master
Fix ios bootimage build
2016-08-12 11:57:00 -06:00
Joshua Warner
b0bee9d501 Merge pull request #494 from dicej/netinet
get netinet headers from iPhoneSimulator SDK, not iPhoneOS SDK
2016-08-12 17:43:50 +00:00
Joshua Warner
559a6d2bd4 fix ios bootimage build 2016-08-12 17:35:34 +00:00
Joshua Warner
8c84b94416 use $(so-prefix) and $(so-suffix) for libjvm 2016-08-12 17:35:16 +00:00
Joel Dice
ad7ad4e512 get netinet headers from iPhoneSimulator SDK, not iPhoneOS SDK
As of SDK 9.2 at least, the headers we need are not part of the device
SDK, only the simulator SDK.
2016-08-12 10:05:37 -06:00
Joshua Warner
f9928ac36e Merge pull request #492 from ReadyTalk/IcmpSendEcho2Ex
patch Inet4AddressImpl.c to declare IcmpSendEcho2Ex
2016-07-02 02:47:56 +00:00
Joel Dice
ad945c00a6 patch Inet4AddressImpl.c to declare IcmpSendEcho2Ex
Apparently the MinGW header files don't declare it, despite it being
part of liblphlapi.a.  More confusingly, it didn't break anything for
64-bit builds because the compiler used an implicit declaration that
matched the link-time symbol name.  Alas, no such luck for 32-bit
builds, since the implicit declaration was not annotated with the @48
stdcall argument stack size, so the build died at link time.
2016-07-01 17:53:04 -07:00
Joshua Warner
a946fab2f2 Merge pull request #491 from waldyrious/patch-1
add license title and capitalize filename
2016-07-01 23:03:04 +00:00
Waldir Pimenta
8b666f6591 add license title and capitalize filename
The title is not strictly required, but it's useful metadata, and part of the recommended license template text (see http://choosealicense.com/licenses/isc/ and https://opensource.org/licenses/isc-license)

As for the filename, lowercase is fine, but since this project already uses an uppercase README as customary, using the same standard for the LICENSE file seemed to make sense.
2016-07-01 08:31:21 +01:00
Joshua Warner
110914d89f Merge pull request #489 from ReadyTalk/timestamps
fix timestamp-related bug in makefile
2016-06-22 03:26:17 +00:00
Joel Dice
8ca9bff2e5 fix timestamp-related bug in makefile
Prior to this commit, we had a little bit of "cleverness" wherein we
recursively invoked make to determine which of the .class files in the
class library were out of date with respect to their .java files.  We
did this to avoid asking javac to recompile everything every time.

The problem with that is when building against an alternative class
library (e.g. OpenJDK or Android), we use a combination of classes
from the alternative library and some of the built-in Avian classes
(e.g. java/lang/invoke/MethodHandle, which is very closely tied to the
VM).  This confuses the build process, since some of the classes were
taken from an external jar, and some of them were built from source.

The tricky bit is that, depending on the relative timestamps of the
extracted .class files and the .java source files, you might never see
the problem.  That's why I couldn't reproduce this when it was first
reported a few months ago: my source files were newer than the .class
files from the OpenJDK jars I was using, so the Avian versions were
built and used as intended.  It was only later when I used a newer
OpenJDK that I hit the problem.

Anyway, I've removed the cleverness.  If this causes an unreasonable
regression in (re)build times, we can try to reintroduce it in a way
that avoids the above problem, but for now simpler is better.
2016-06-21 16:34:45 -06:00
Joel Dice
a230a6f4dc Merge pull request #487 from joshuawarner32/master
Don't access length field of non-array objects (fixes #486)
2016-05-29 10:07:52 -06:00
Joshua Warner
95cd300bbd Don't access potentially mis-aligned, non-existent length field for non-array objects (fixes #486) 2016-05-26 14:37:26 +00:00
Joshua Warner
134d10960b Merge pull request #485 from dicej/default
support Java 8 default interface methods
2016-05-14 19:31:39 -06:00
Joel Dice
aacbd7cc7a support Java 8 default interface methods 2016-05-14 13:32:42 -06:00
Joel Dice
08982cc9ed Merge pull request #480 from dicej/ios
update to iOS 9.2 SDK and define sysroot for iOS
2016-05-14 13:18:48 -06:00
Joel Dice
edbce08e61 Merge pull request #484 from bigfatbrowncat/msys2-support
Added support for MSYS2 with mingw-w64 toolchain
2016-04-28 09:16:36 -06:00
Ilya Mizus
02fedde306 Added support for MSYS2 with mingw-w64 toolchain 2016-04-28 11:03:52 +03:00
Joshua Warner
c843d76f63 Merge pull request #483 from dicej/no-msys
MSYS update, plan B
2016-04-27 13:45:15 +00:00
Joel Dice
6106df6c69 remove MSYS instructions from README.md
Although some people still use MSYS to build Avian (e.g. the
avian-pack project), I'd rather not support it officially, and the
instructions in the README.md are outdated anyway.  This will
hopefully encourage new users to use Cygwin instead, which is less
likely to break without me noticing since that's what I use myself.
2016-04-26 19:09:32 -06:00
Joel Dice
b999772838 Revert "drop MSYS build support"
This reverts commit d930f41d7e.

Turns out the avian-pack project really needs MSYS support, so I'm
reverting this.
2016-04-26 19:06:25 -06:00
Joshua Warner
954902019b Merge pull request #482 from ReadyTalk/no-msys
drop MSYS build support
2016-04-25 16:55:21 +00:00
Joel Dice
d930f41d7e drop MSYS build support
Per a recent request for help on the Google group, I spent some time
this past weekend trying to debug the MSYS build.  The conclusion I
came to is that MSYS is not worth supporting anymore.  The most recent
release is almost three years old, and I've been unable to find any
variant with a 64-bit-target compiler that will actually install.  If
someone else cares enough about building Avian on MSYS to maintain it
themselves, patches are welcome.

Meanwhile, let's all just use Cygwin.  Perhaps someone will build a
cool package manager on top of WSL and suddenly make both Cygwin and
MSYS obsolete.
2016-04-25 09:02:35 -07:00