Commit Graph

2887 Commits

Author SHA1 Message Date
Joel Dice
fa8ba2afc8 fix build for recent versions of OpenJDK 7
As of the latest code from the jdk7u-dev Mercurial repository,
java.lang.String no longer has offset or length fields.  Instead, the
content fits exactly into the backing char array, so offset is
implicitly zero and length is the length of the array.  The VM
previously relied on those fields being present, whereas this commit
handles the case where they are not.

In addition, I've made some changes to openjdk-src.mk to ensure that
we can build against both a stock OpenJDK 7 and an IcedTea-patched
version.
2012-06-11 23:30:22 +00:00
Joel Dice
165986841e fix endianess bug in LZMA decoding 2012-06-06 12:58:24 -06:00
Joel Dice
ba6ca031bb fix handling of no-argument options in bootimage.cpp 2012-06-05 13:53:13 -06:00
Joel Dice
f6299fdfe6 fix bootimage build regression 2012-06-05 13:33:29 -06:00
Joel Dice
7d8def84e0 fix build on old Xcode versions 2012-06-04 09:52:06 -06:00
Joel Dice
9ea6a28383 fix MSVC build regression 2012-06-04 09:51:11 -06:00
Joel Dice
84034c00a8 use GitHub URL for hello-ios.git link 2012-06-02 18:56:15 -06:00
Joel Dice
9520b03333 fix OS X build regressions 2012-06-02 18:56:07 -06:00
Joel Dice
d61501453f add support for LZMA on Windows 2012-06-02 15:43:42 -06:00
Joel Dice
f07a8c7ec4 make LZMA encoder by default 2012-06-02 13:23:52 -06:00
Joel Dice
5d9f7b2bc3 add optional LZMA support for compressing embedded JARs, boot images, and shared objects 2012-06-02 09:06:22 -06:00
Joel Dice
bd7ef24734 pass -std=c++11 to Clang for C++ code 2012-06-01 17:57:42 -06:00
Joel Dice
879df617df add use-clang option for building with LLVM Clang instead of GCC
This also fixes several errors and warnings emitted by Clang.
2012-06-01 17:43:42 -06:00
Joel Dice
b78c772ffb fix C++11 narrowing conversion errors 2012-06-01 11:46:56 -06:00
Joshua Warner
587ae00d80 Merge branch 'master' of oss.readytalk.com:/var/local/git/avian into oss-ext 2012-05-24 08:36:37 -06:00
Joshua Warner
5d6899a867 fix warning in disassembler code
Apple's GCC is more picky about undefined ordering (and rightfully so)...
2012-05-24 08:36:21 -06:00
Joel Dice
f21863fd32 Merge remote-tracking branch 'origin/master' 2012-05-22 17:56:33 -06:00
Joel Dice
20ee660455 preserve classes needed for Unix filesystem access from ProGuard
It seems that there are new classes loaded via reflection or JNI in
OpenJDK needed for filesystem access, so we must tell ProGuard to
retain them.
2012-05-22 17:48:43 -06:00
Mike Keesey
1f7b1a74e8 Adding java.util.SortedSet. 2012-05-22 16:21:57 -06:00
Mike Keesey
97ffc5b15e Adding java.util.Queue interface and java.util.AbstractQueue. 2012-05-22 15:23:28 -06:00
Mike Keesey
be869932d0 Adding @Target and the associated ElementType enum for specifying the type an annotation is. 2012-05-22 15:18:42 -06:00
Mike Keesey
a5c9dd6f24 Fixing some issues with runtime annotations within avian.
We were not properly converting dots to slashes internally for package names
and we did not properly handle Method.getAnnotations and
Method.getAnnotation(Class<T>) on methods without any annotations.

Added some tests to cover these cases.
2012-05-22 14:02:51 -06:00
Joshua Warner
7bd3ea1892 add simple disassembler for debugging 2012-05-22 13:58:53 -06:00
Joel Dice
0addd8c814 update copyright years 2012-05-11 17:43:27 -06:00
Joel Dice
8d57e91971 add script for updating copyright years based on most recent Git commit 2012-05-11 17:43:13 -06:00
Joel Dice
f94d10cbba document iOS support in readme.txt 2012-05-11 16:43:38 -06:00
Joel Dice
f0152f1d33 Merge branch 'jdk7' 2012-05-11 16:41:18 -06:00
Joel Dice
d0eda37a90 make Thread.interrupted static to match Java API 2012-05-11 13:23:19 -06:00
Joel Dice
90fae940a7 throw IncompatibleClassChangeError on unexpected static status
If a class references a field or method as static and we find it's
actually non-static -- or vice-versa -- we ought to throw an error
rather than abort.
2012-05-11 13:19:55 -06:00
Joshua Warner
362d6594a8 fix minor memory leak with default bootimage symbols 2012-05-11 09:06:51 -06:00
Joshua Warner
3dcf886bbe allow passing bootimage / codeimage start and end symbol names to the bootimage-generator
The usage statement for the bootimage-generator now looks like this:
build/linux-x86_64-bootimage/bootimage-generator \
  -cp <classpath> \
  -bootimage <bootimage file> \
  -codeimage <codeimage file> \
  [-entry <class name>[.<method name>[<method spec>]]] \
  [-bootimage-symbols <start symbol name>:<end symbol name>] \
  [-codeimage-symbols <start symbol name>:<end symbol name>]
2012-05-10 14:49:59 -06:00
Joshua Warner
24061251cf fix readme.txt reference to binaryToObject 2012-05-10 12:11:31 -06:00
Joshua Warner
fa9814b86d remove lots of unnecessary sizeof computations with a convenient 'operator new' overload 2012-05-08 16:14:54 -06:00
Joshua Warner
64b9407420 Merge branch 'master' into jdk7 2012-05-07 15:05:56 -06:00
Joshua Warner
fde7a3e7a1 give virtualThunks names based on index, to avoid conflicts 2012-05-07 15:05:40 -06:00
Joshua Warner
7c38ea75e4 give thunks symbol names in the bootimage build, use Heap::allocate instead of malloc 2012-05-07 10:00:59 -06:00
Joshua Warner
4266b0df7f fix step numbering in readme.txt 2012-05-07 08:29:43 -06:00
Joshua Warner
5c44ba859c minor correction to bootimage process in readme.txt 2012-05-07 08:13:04 -06:00
Joel Dice
b09a388be5 update readme.txt to reflect OpenJDK 7 dependency 2012-05-04 20:31:50 -06:00
Joel Dice
4a4b82d959 Merge remote branch 'oss/master' into jdk7 2012-05-04 20:24:27 -06:00
Joel Dice
797b4c25cc fix OpenJDK bootimage build regression 2012-05-04 20:13:26 -06:00
Joel Dice
1119675b7a override InputStream.available for FileInputStream and the instance returned by ZipFile.getInputStream 2012-05-04 19:55:53 -06:00
Joel Dice
189340954a fix build regression due to last merge 2012-05-04 18:59:15 -06:00
Joel Dice
5ef5158bc1 Merge remote branch 'oss/master' into jdk7 2012-05-04 18:54:31 -06:00
Joel Dice
ea4e0a2f5d fix a couple of subtle Thread.getStackTrace bugs
The first problem was that, on x86, we failed to properly keep track
of whether to expect the return address to be on the stack or not when
unwinding through a frame.  We were relying on a "stackLimit" pointer
to tell us whether we were looking at the most recently-called frame
by comparing it with the stack pointer for that frame.  That was
inaccurate in the case of a thread executing at the beginning of a
method before a new frame is allocated, in which case the most recent
two frames share a stack pointer, confusing the unwinder.  The
solution involves keeping track of how many frames we've looked at
while walking the stack.

The other problem was that compareIpToMethodBounds assumed every
method was followed by at least one byte of padding before the next
method started.  That assumption was usually valid because we were
storing the size following method code prior to the code itself.
However, the last method of an AOT-compiled code image is not followed
by any such method header and may instead be followed directly by
native code with no intervening padding.  In that case, we risk
interpreting that native code as part of the preceding method, with
potentially bizarre results.

The reason for the compareIpToMethodBounds assumption was that methods
which throw exceptions as their last instruction generate a
non-returning call, which nonetheless push a return address on the
stack which points past the end of the method, and the unwinder needs
to know that return address belongs to that method.  A better solution
is to add an extra trap instruction to the end of such methods, which
is what this patch does.
2012-05-04 18:51:58 -06:00
Joel Dice
19de383aae Merge branch 'master' into jdk7
Conflicts:
	makefile
2012-05-04 11:33:16 -06:00
Joel Dice
58691a7fdb fix native Windows build
For some reason, Cygwin's MinGW-W64 compilers end up pulling in our
version of process.h from unistd.h.  That doesn't really make sense --
it should use the one from the sysroot, but we can work around it by
just not including unistd.h, since it's not needed on Windows anyway.
2012-05-03 14:55:51 -06:00
Joshua Warner
8c0ef382f8 write out bootimage directly from the bootimage-generator, eliminating one of the steps in a custom bootimage build 2012-05-03 12:04:34 -06:00
Joshua Warner
9cbd67ec61 darwin doesn't have <malloc.h>, apparently 2012-05-03 10:13:56 -06:00
Joshua Warner
1b5f37c9de correctly define the target platform in the case of a bootimage build 2012-05-03 10:13:56 -06:00