Commit Graph

2814 Commits

Author SHA1 Message Date
Joel Dice
616c08fee9 Merge remote branch 'oss/master' into jdk7
Conflicts:
	makefile
2012-04-10 07:53:00 -06:00
Joel Dice
ba1f8aa68e don't fail build on missing iOS SDK unless actually building for iOS 2012-04-07 17:15:59 -06:00
Joel Dice
2fedfdea5b fix OS X build regression 2012-04-06 16:52:24 -06:00
Joel Dice
2b4407a962 fix iOS build regression 2012-04-05 10:04:53 -06:00
Joel Dice
8742ae1bde Merge branch 'jdk7' of oss.readytalk.com:/var/local/git/avian into jdk7 2012-04-05 09:51:52 -06:00
JET
6323c76540 added space before ';' in empty for loop to make Apple happy 2012-04-04 13:13:06 -06:00
JET
57092ece0d fixed Win32 getenv implementation 2012-04-03 10:38:48 -06:00
JET
2f225795fc added RuntimePermission and System.getenv() 2012-04-02 22:15:02 -06:00
Joel Dice
ae2b58ee40 increase bootimage.cpp heap and code size limits
OpenJDK is huge, so building a bootimage out of the whole thing (as
opposed to an app shrunk using ProGuard) requires a lot of space.
Note that we still can't handle this on ARM or PowerPC due to a
limitation in the compiler, but we don't expect people to ship
binaries with the entire OpenJDK class library anyway, so it shouldn't
be a problem in practice.
2012-03-27 18:14:29 -06:00
Joel Dice
48bb1e4f41 include charsets.jar in openjdk-src build
The other JARs we were including refer to classes in this jar, so we
need to include it as well.
2012-03-27 17:58:52 -06:00
Joel Dice
a2e0151728 initialize Machine::OutOfMemoryError in writeBootImage2
If we don't initialize that at our first opportunity, it's possible
we'll run out of memory later and exit silently instead of printing
the error and returning a nonzero exit code.
2012-03-27 17:57:11 -06:00
Joel Dice
4800518a31 fix bootimage.cpp build regression
I forgot to update bootimage.cpp when I added a parameter to Machine's
constructor in d78247a.
2012-03-27 08:22:35 -06:00
Joel Dice
382f016415 remove debug logging 2012-03-26 18:12:58 -06:00
Joel Dice
994098baf1 make find[Field|Method]InClass non-inline functions
It seems that GCC 4.6.1 gets confused at LTO time when we take the
address of inline functions, so I'm switching them to non-inline
linkage to make it happy.
2012-03-26 18:09:35 -06:00
Joel Dice
1be6fe6f15 add -march=i586 to lflags as well as cflags where appropriate
When link time optimization is enabled, we need to remind the compiler
that we're targeting i586 when linking so it can resolve atomic
operations like __sync_bool_compare_and_swap.
2012-03-26 18:09:35 -06:00
Joel Dice
2ee3771125 make find[Field|Method]InClass non-inline functions
It seems that GCC 4.6.1 gets confused at LTO time when we take the
address of inline functions, so I'm switching them to non-inline
linkage to make it happy.
2012-03-26 18:06:16 -06:00
Joel Dice
031852daec add -march=i586 to lflags as well as cflags where appropriate
When link time optimization is enabled, we need to remind the compiler
that we're targeting i586 when linking so it can resolve atomic
operations like __sync_bool_compare_and_swap.
2012-03-26 18:02:43 -06:00
Vaughn Dice
5be0edd628 Use latest iOS SDK found on local machine 2012-03-26 11:28:07 -06:00
Vaughn Dice
a10ce99302 Use latest iOS SDK found on local machine 2012-03-26 11:23:31 -06:00
Joel Dice
97ebf2173c Merge remote-tracking branch 'origin/master' into jdk7 2012-03-22 17:00:45 -06:00
Joshua Warner
8e6f5ac6e3 add ZipEntry.isDirectory (trivial implementation) 2012-03-21 10:38:30 -06:00
Joel Dice
4f0d275e13 run JNI_OnLoad if found in ClassLoader.loadLibrary 2012-03-18 20:10:42 -06:00
Joel Dice
674c560494 fix static field alignment calculation
The previous code caused overlap between 64-bit fields and subsequent
fields under certain circumstances on 32-bit systems.
2012-03-17 22:45:35 -06:00
Joel Dice
9a50e69587 remove debug logging 2012-03-17 22:42:15 -06:00
Joel Dice
0167868797 various Windows OpenJDK 7 fixes 2012-03-17 18:47:22 -06:00
Joel Dice
75b5d3df4a fix Windows OpenJDK 7 build 2012-03-17 12:59:22 -06:00
Joel Dice
8abe9bf469 fix memory leak in freeZipFileEntry 2012-03-17 12:58:41 -06:00
Joel Dice
8cb6446bec handle zero-length arrays in truncate functions 2012-03-17 12:57:59 -06:00
Joel Dice
333b6c59d4 fix non-embedded openjdk build on OS X
The JRE lib dir for OpenJDK 7 on OS X seems to be just "lib", not
e.g. "lib/amd64" by default, so we use that now.  Also, the default
library compatibility version for libjvm.dylib is 0.0.0, but OpenJDK
wants 1.0.0, so we set it explicitly.
2012-03-16 11:01:20 -06:00
Joel Dice
d78247ab9a implement -Xss command line option 2012-03-14 12:36:42 -06:00
Joel Dice
d718bbf833 implement Unsafe.getByte(Object, long) 2012-03-14 12:35:22 -06:00
Joel Dice
b6cdf4efcb remove debug logging 2012-03-14 12:08:14 -06:00
Joel Dice
c4722fa843 update Unsafe.setMemory to reflect new OpenJDK 7 signature and semantics 2012-03-14 11:54:03 -06:00
Joel Dice
f8934b2c9d fix race condition in System::Monitor::wait
If we clear Thread::flags before releasing the thread mutex and
re-acquiring the monitor mutex, it's possible that we will be notified
between the release and re-acquire, which will confuse us later if we
try to wait on the same monitor again such that we well not remove
ourselves from the wait list because we think we've been removed by
the notifier.

The solution is to wait until we've acquired both mutexes before we
clear Thread::flags.
2012-03-14 11:38:20 -06:00
Joel Dice
eb9f5c6dcc Merge remote branch 'oss/master' into jdk7 2012-03-14 08:22:46 -06:00
Joel Dice
f2e26791a4 handle constant-to-register "zero-extend" moves in x86.cpp
We've already been handling this case in arm.cpp and powerpc.cpp, but
apparently we've never hit this code path in x86.cpp before.  Indeed,
I've been unable to come up with a Java source code test that hits it;
it's only come up in Scala-generated bytecode.
2012-03-13 17:00:47 -06:00
Joel Dice
37044236d4 provide dummy implementation of JVM_GetThreadInterruptEvent 2012-03-13 10:31:08 -06:00
Joel Dice
58dc32382d fix memory management bugs in finder.cpp 2012-03-13 10:30:41 -06:00
Joel Dice
756f58210a add test for sun.misc.Unsafe functionality 2012-03-13 08:28:33 -06:00
Joel Dice
4aefa211a3 File.createNewFile should return false if the file already exists 2012-03-13 08:26:51 -06:00
Joel Dice
3817bc280e heretofore untested iOS OpenJDK support 2012-03-11 17:46:36 -06:00
Joel Dice
3820fec9d7 fix OS X OpenJDK 7 build 2012-03-11 16:26:46 -06:00
Joel Dice
1c2f516b68 Merge remote-tracking branch 'origin/master' into jdk7
Conflicts:
	src/classpath-openjdk.cpp
2012-03-11 15:30:38 -06:00
Joel Dice
6cc0ddda7c implement JVM_HoldsLock 2012-03-11 05:06:08 -06:00
Joel Dice
04a34a75ed implement sun.misc.Unsafe.monitorEnter and monitorExit 2012-03-11 05:05:14 -06:00
Joel Dice
3e38628ad6 check superclasses in fieldForOffset, not just immediate class 2012-03-11 05:04:12 -06:00
Joel Dice
8590695f2d constrain exception handler bounds to bytecode length
Scala occasionally generates exception handler tables with interval
bounds which fall outside the range of valid bytecode indexes, so we
must clamp them or risk out-of-bounds array accesses.
2012-03-11 05:00:08 -06:00
Joel Dice
71295e54c7 handle constants larger than 8 bits in subtractBorrowCR 2012-03-11 04:59:42 -06:00
Joel Dice
6c9a1e1643 add "throws IOException" to java.io.File.createTempFile 2012-03-11 04:57:22 -06:00
Joel Dice
443097f3bc add support for Xcode 4.3 2012-03-07 08:55:01 -07:00