Commit Graph

4139 Commits

Author SHA1 Message Date
Joshua Warner
d9fee1025c use ir::Type in Compiler::return_ 2014-05-29 15:30:45 -06:00
Joshua Warner
587b1e3eda use ir::Type in place of lir::ValueType in Value 2014-05-29 15:30:45 -06:00
Joshua Warner
855534b152 introduce ir::Type and begin migrating i2f and friends to it 2014-05-29 15:30:45 -06:00
Joshua Warner
73bcc766c1 Merge pull request #271 from dicej/socketexception
don't use GetPrimitiveArrayCritical when throwing SocketExceptions
2014-05-23 10:52:30 -06:00
Joel Dice
c0adc9a81e don't use GetPrimitiveArrayCritical when throwing SocketExceptions
690ba9c fixed this for throwIOException, but we didn't notice that
throwSocketException had the same problem.
2014-05-23 10:35:44 -06:00
Joshua Warner
f2c78af824 Merge pull request #269 from dicej/handler
fix non-Avian classpath build regression introduced in 7a768f2
2014-05-21 11:13:07 -06:00
Joel Dice
8861f43f6d fix non-Avian classpath build regression introduced in 7a768f2
While Avian's java.util.logging.Handler only has one abstract method,
the standard version has three.
2014-05-21 10:46:52 -06:00
Joel Dice
6d68ae7c13 Merge pull request #268 from joshuawarner32/clean-shutdown
cleanly destroy MyProcessor
2014-05-20 18:30:05 -06:00
Joshua Warner
e2f613e063 cleanly destroy MyProcessor to allow for creating/destroying VMs in the same process multiple times 2014-05-20 17:26:11 -06:00
Mike Jensen
714e946863 Merge pull request #267 from dicej/log-level
fix log level inheritance
2014-05-20 16:40:30 -06:00
Joel Dice
40f7d3b998 Merge pull request #265 from joshuawarner32/version-flag
add simple version flag
2014-05-20 14:41:59 -06:00
Joel Dice
f6996ceb61 Merge pull request #266 from joshuawarner32/unknown-host-proguard
Add UnknownHostException to proguard config
2014-05-20 14:37:09 -06:00
Joel Dice
7a768f2c69 fix log level inheritance
A Logger which has not had a level set explicitly should inherit its
effective level from its parent, not just default to INFO.
2014-05-20 14:26:56 -06:00
Joshua Warner
0b5dee6286 Add UnknownHostException to proguard config 2014-05-20 14:12:38 -06:00
Joshua Warner
7ee03be2e9 add simple version flag 2014-05-20 13:13:17 -06:00
Joshua Warner
b28142a837 Merge pull request #264 from jentfoo/master
Fix package for LegacyObjectInputStream
2014-05-20 13:12:44 -06:00
Mike Jensen
0b0071dd7f Fix package for LegacyObjectInputStream (ammending commit to try to force a travis build) 2014-05-20 12:58:27 -06:00
Joel Dice
1396551433 Merge pull request #262 from dicej/ios
fix iOS OpenJDK and simulator builds
2014-05-18 20:46:22 -06:00
Joel Dice
d75c2131fb fix iOS OpenJDK and simulator builds
With the iOS openjdk-src build, sun.misc.Launcher will throw an
InternalError if avian.file.Handler is not present, so let's make it
happy.

Also, as of recent version(s) of Xcode, there are no utilities
(e.g. ar and strip) in iPhoneSimulator.platform/usr/bin, so we can
just use the system ones.
2014-05-18 19:23:21 -06:00
Joel Dice
b52f4389b2 Merge pull request #261 from jentfoo/master
Change ByteArrayOutputStream's toString function to match openJDK's expectation
2014-05-18 14:07:06 -06:00
Mike Jensen
a7b548f347 Change ByteArrayOutputStream's toString function to match openJDK's expectation 2014-05-14 17:09:15 -06:00
Joshua Warner
7273a999bc Merge pull request #260 from dicej/resource-crash
fix crash on exit due to order of operations bug in ~RawMonitorResource
2014-05-11 17:42:27 -06:00
Joel Dice
4a83b671b3 fix crash on exit due to order of operations bug in ~RawMonitorResource
The problem (which we've only been able to reproduce consistently with
the openjdk-src process=interpret build on Linux virtual machines) was
a race condition during VM shutdown.  Thread "A" would exit, see there
were other threads still running and thus enter ZombieState, which
involves acquiring and releasing a lock using RawMonitorResource.
Then the last thread (thread "B") would exit, wait for thread "A" to
release the lock, then shut down the VM, freeing all memory.  However,
thread "A" writes to its Thread object one last time after releasing
the lock (in ~Resource, the destructor of the superclass of
RawMonitorResource, which sets Thread::resource).  If thread "B" frees
that Thread before ~Resource runs, we end up writing to freed memory.

Thus, we need to update Thread::resource before releasing the lock.
Apparently C++ destructors run in order from most derived to least
derived, which is not what we want here.  My solution to split
Resource into two classes, one that has no destructor and another that
extends it (called AutoResource) which does hafe a destructor.  Now
all the classes which used to extend Resource extend AutoResource,
except for RawMonitorResource, which extends Resource directly so it
can control the order of operations.
2014-05-10 23:25:59 -06:00
Mike Jensen
10056734e2 Merge pull request #259 from dicej/totalMemory
move Runtime.freeMemory and totalMemory to builtin.cpp
2014-05-10 22:45:02 -06:00
Joel Dice
0800508b4e move Runtime.freeMemory and totalMemory to builtin.cpp
This allows them to be shared between the Avian and Android class
library builds.

This commit also disables the URL test in Misc.java on Android, since
it's known to fail, and we still want to know whether the other tests
pass.
2014-05-10 18:56:04 -06:00
Joel Dice
84d97fb34c Merge pull request #256 from joshuawarner32/docker
Add i386 and openjdk dockerfiles
2014-05-10 18:55:11 -06:00
Joshua Warner
758909e15a Merge pull request #257 from dicej/windows
Windows fixes
2014-05-09 16:56:42 -06:00
Joel Dice
c35435e450 fix portability problem in Strings test
There was a test in Strings.java that assumed the default character
encoding was UTF-8, which is an invalid assumption on some platforms
(e.g. Windows).  This modifies the test to specify the encoding
explicitly.
2014-05-09 16:38:33 -06:00
Joel Dice
81958144a1 fix test-flags definition for Windows
We need to quote a classpath with a Windows path separator (';') so it
isn't interpreted by the shell.
2014-05-09 16:37:17 -06:00
Joshua Warner
27ee3114ae add build command logging to ci.sh 2014-05-09 15:16:55 -06:00
Joshua Warner
a12b4c757a add dockerfile for openjdk building (and testing) 2014-05-09 14:03:52 -07:00
Joshua Warner
2971759d6e add dockerfile for i386 cross-compiling (and testing) 2014-05-09 08:44:27 -07:00
Joel Dice
34f8cf50d1 update version to 1.0 2014-05-08 10:00:31 -06:00
Joshua Warner
73912afaf7 Merge pull request #255 from dicej/align
fix stack alignment bug in vmJumpAndInvoke
2014-05-08 09:49:14 -06:00
Joel Dice
3696edeb1e fix stack alignment bug in vmJumpAndInvoke
This was causing crashes on 32-bit OS X continuations=true builds.

There were two important differences between vmInvoke and
vmJumpAndInvoke: (1) vmInvoke expects its stack to be aligned on
entry, modulo the return address whereas the stack argument to
vmJumpAndInvoke is aligned without allowing for the return address,
and (2) vmInvoke pushes EBP before doing its frame allocation, whereas
vmJumpAndInvoke did not take that into account.  So in order for
vmJumpAndInvoke to allocate the exact same frame size that vmInvoke
would have when calling the same method, it needed to add an extra two
words beyond what it was already allocating.

Aside from alignment concerns, the code is not particularly sensitive
to vmJumpAndInvoke allocating a different frame size than vmInvoke,
since we store the frame pointer in a "thread local" variable:

   // remember this stack position, since we won't be able to rely on
   // %rbp being restored when the call returns
   movl   8(%ebp),%eax
   movl   %esp,TARGET_THREAD_SCRATCH(%eax)
...
GLOBAL(vmInvoke_returnAddress):
   // restore stack pointer
   movl   TARGET_THREAD_SCRATCH(%ebx),%esp

My original patch makes an equivalent change for the 64-bit changes,
but I'll leave that for after we release 1.0 since we're in
bugfix-only mode right now
2014-05-08 09:20:12 -06:00
Joel Dice
18e9a01184 Merge pull request #253 from joshuawarner32/make-fixes
Small make fixes
2014-05-07 16:23:04 -06:00
Joel Dice
8889903eed Merge pull request #254 from joshuawarner32/android-fixes
add Field.getDeclaredAnnotations default method for android classpath
2014-05-07 16:22:09 -06:00
Joshua Warner
518f428f13 add Field.getDeclaredAnnotations default method for android classpath (fixes Reflection test) 2014-05-07 14:48:21 -06:00
Joshua Warner
f15703afd2 add include paths for compiling with openjdk-icedtea7-jdk7u45_2.4.3 on darwin 2014-05-07 13:06:00 -06:00
Joshua Warner
22b610ffb5 fix parameterization of debugger 2014-05-07 13:06:00 -06:00
Joshua Warner
95122204f4 add sanity checks for makefile parameters 2014-05-07 13:06:00 -06:00
Joel Dice
2f7356863b Merge pull request #249 from joshuawarner32/remove-powerpc
remove powerpc support
2014-05-02 07:13:12 -06:00
Joel Dice
8673389fdc Merge pull request #252 from joshuawarner32/master
Define user.home property on posix
2014-05-01 12:42:18 -06:00
Joshua Warner
95cffe90b2 Define user.home property on posix 2014-05-01 11:26:27 -06:00
Joel Dice
451135aef3 Merge pull request #251 from joshuawarner32/ios-7.1
add support for 7.1 ios SDK
2014-04-30 16:44:48 -06:00
Joshua Warner
d37c6ce09b add support for 7.1 ios SDK 2014-04-30 13:23:22 -06:00
Joel Dice
6cecfe81d0 Merge pull request #250 from joshuawarner32/fix-tests
Fix ci.sh tests on arm qemu systems
2014-04-30 08:01:56 -06:00
Joel Dice
6de967af24 Merge pull request #247 from joshuawarner32/docker
Add dockerfiles for cross-compiling to windows and linux-arm
2014-04-30 07:59:10 -06:00
Joshua Warner
94bd876f35 ci.sh: control which target is run for each of the configurations
There are two important things here:
* We only want to run "jdk-test" if we were running "test" for everything else.
  This gets around a bug where jdk-test fails for cross-compile builds (where JNI is involved)
* We can specify a different test target by setting the "test" environment variable.
  This is useful for cross-compiling the tests in a docker image
  (setting the test_target to "build-test")
2014-04-29 14:19:42 -07:00
Joshua Warner
9839321922 add dockerfile for arm cross-compilation 2014-04-29 14:33:06 -06:00