Commit Graph

2755 Commits

Author SHA1 Message Date
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
Joel Dice
e8e3c9066f implement sun.misc.Unsafe raw memory access methods
The primitive get/put methods are implemented as intrinsics by the
compiler for performance.
2012-03-06 13:07:59 -07:00
Joel Dice
44277db2de fix handling of exceptions thrown from interpreter during method invocation
Since we use Thread::code to store a reference to either the method to
be invoked or the current bytecode being executed depending on the
context, we must be careful to switch it back to the bytecode of the
exception handler if an exception is thrown while invoking a method
(e.g. an UnsatisfiedLinkError).
2012-03-06 13:03:42 -07:00
Joel Dice
ac63d08450 fix bootimage field offset calculation for derived classes
There was a subtle bug in that we were not considering alignment
padding for fields defined in superclasses when calculating field
offsets for a derived class when the superclass(es) were visited by
the bootimage generator before the derived class.
2012-03-04 11:38:12 -07:00
Joel Dice
1d77b06540 fix recent throwNew/makeThrowable regression
6fceca9 introduced a string formatting regression in these methods,
which this commit fixes.
2012-03-03 18:37:27 -07:00
Joel Dice
87032ca8a8 Merge remote-tracking branch 'git/master' 2012-03-02 16:33:50 -07:00
Matt Weaver
a7157199f3 armv7 is actually 9 2012-03-02 16:06:22 -07:00
Matt Weaver
6a20d0289c switching to armv7 2012-03-02 16:00:08 -07:00
Joel Dice
5203cb5dcf implement JNI methods NewWeakGlobalRef and DeleteWeakGlobalRef 2012-02-29 11:51:30 -07:00
Joel Dice
6fceca940f fix makeByteArray and makeString for strings longer than 256 characters 2012-02-29 11:49:13 -07:00
Joel Dice
5a5d2a8dd2 fix JNI float argument passing
Floats are implicitly promoted to doubles when passed as part of a
variable-length argument list, so we can't treat them the same way as
32-bit integers.
2012-02-28 15:35:28 -07:00
Joel Dice
c6ac66e45a fix bug in isAssignableFrom such that primitive array types were considered to be subclasses of the Object array type 2012-02-27 18:16:01 -07:00
Joel Dice
b5fda8ee13 use avian.http.Handler for http(s) URLs, not avian.file.Handler 2012-02-27 13:38:47 -07:00
Joel Dice
574a8ea1e2 Merge branch 'master' into prv-ga-merge 2012-02-27 13:28:06 -07:00
Joel Dice
d09eb3c671 Merge remote branch 'oss/master' 2012-02-22 10:08:14 -07:00
Seth Goings
e849d8f9c9 Updates to .gitignore to get rid of any possibility of checking in binaries in lib/distrib directories, and generalized method of setting location of win32 and win64 libs. 2012-02-20 16:25:37 -07:00
Joel Dice
750e5f903c include leading slash in path when parsing URLs in URLStreamHandler
This matches the behavior of OpenJDK's version.
2012-02-18 15:14:16 -07:00
Joel Dice
999e90c332 fix MSVC build 2012-02-16 18:22:11 -07:00
Joel Dice
c5ef39f2bd implement File.getAbsoluteFile for Windows 2012-02-16 18:19:01 -07:00
Dain
84185f0884 Merge remote branch 'origin/http_url' into prv-ga-merge 2012-02-16 11:08:53 -07:00
Joel Dice
9fe2d69b06 improve seed generation in java.util.Random
The previous code caused frequent seed collisions for successive calls
to the no-arg constructor, even for single threaded workloads.  This
patch should avoid such collisions in both single and multi-threaded
cases.
2012-02-14 15:17:07 -07:00
Joel Dice
a254d20e0e improve seed generation in java.util.Random
The previous code caused frequent seed collisions for successive calls
to the no-arg constructor, even for single threaded workloads.  This
patch should avoid such collisions in both single and multi-threaded
cases.
2012-02-14 13:03:13 -07:00
Dain
c323bc86b5 Merge branch 'http_url' into oss-master 2012-02-14 10:54:04 -07:00
Joshua Warner
a1c5cccd96 undo accidental modification of makefile 2012-02-13 10:04:13 -07:00
Joshua Warner
bbb4529752 implement File.setExecutable(), File.canExecute(), and File.createTempFile() 2012-02-09 14:23:24 -07:00
Joshua Warner
edc768f837 implement File.setExecutable(), File.canExecute(), and File.createTempFile() 2012-02-09 14:04:42 -07:00
Joel Dice
33976d1ba4 ensure debug helper functions are retained by linker
Apple's linker tends to remove functions which are never called, which
is not what we want for e.g. vmPrintTrace, since that function is only
intended to be called interactively from within GDB.
2012-02-04 15:42:19 -07:00
Joel Dice
be6896b8a0 avoid running out of OS resources due to zombie thread accumulation (part 2)
My previous attempt wasn't quite sufficient, since it was too late to
call join on a thread which had already exited given the code was
written to aggressively dispose of system handles as soon as the
thread exited.  The solution is to delay disposing these handles until
after we're able to join the thread.
2012-02-03 17:20:20 -07:00
Joel Dice
67a3ca881b remove debug logging 2012-02-03 13:54:00 -07:00
Joel Dice
c3256c2874 avoid running out of OS resources due to zombie thread accumulation
The bug here is that when a thread exits and becomes a "zombie", the
OS resources associated with it are not necessarily released until we
actually join and dispose of that thread.  Since that only happens
during garbage collection, and collection normally only happens in
response to heap memory pressure, there's no guarantee that we'll GC
frequently enough to clean up zombies promptly and avoid running out
of resources.

The solution is to force a GC whenever we start a new thread and there
are at least N zombies waiting to be disposed, where N=16 for now.
2012-02-03 12:00:02 -07:00
Joel Dice
b45528203d avoid crashes due to calling select or wakeup on a closed Selector 2012-01-31 09:48:05 -07:00
Joel Dice
807f2a8d51 avoid crash when Selector.close is called more than once on the same instance 2012-01-30 13:42:32 -07:00
Joel Dice
222b357089 specify 4-byte alignment of functions defined in ARM assembly code
Apple's assembler, at least, won't automatically align these properly
for us, so we need to explicitly specify the required alignment.
2012-01-19 16:42:35 -07:00
Dain
a6753c3dc3 Request a share mode of both reading and writing for RandomAccessFile open.
This change allows reading and writing to happen concurrently on the
file on Windows.
2012-01-19 15:10:45 -07:00
Joel Dice
d29513c653 fix Avian_sun_misc_Unsafe_compareAndSwapLong for platforms without atomicCompareAndSwap64
We never define atomicCompareAndSwap64 for ARM or PowerPC, and
apparently only very recent ARM chips support it, so we must fall back
to synchronization-based emulation.
2012-01-15 10:02:36 -07:00
Joel Dice
49d19456d0 fix infinite wait in Unsafe.park
There were a couple of problems with the Avian_sun_misc_Unsafe_park
implementation in classpath-openjdk.cpp.  First, the wait time should
be interpreted as milliseconds if absolute, but as nanoseconds
otherwise, whereas we were treating it as milliseconds in both cases.
Second, there was no mechanism to exit the while loop after the
specified time; the only way we could exit was via an unpark or
interrupt.
2012-01-14 20:27:40 -07:00
Joel Dice
929315e1f2 avoid crash when parsing certain abstract classes which declare no methods 2012-01-13 16:51:39 -07:00
Joel Dice
0aa5755187 call C library free directly instead of System::free where possible
There was a subtle race condition in the VM shutdown process such that
a System::Thread would be disposed after the System instance it was
created under has been disposed, in which case doing a virtual call to
System::free with that instance would potentially cause a crash.  The
solution is to just call the C library version of free directly, since
that's all System::free does.
2012-01-12 11:00:58 -07:00
Joel Dice
7022b23b26 add AbstractCollection.toString implementation 2012-01-12 10:45:05 -07:00
Dain
70408ea717 Fix a bug in parsing the port value from a URL. 2012-01-12 09:55:03 -07:00
Dain
651b0eb49a Add rudimentary support for http/https protocols in URL. 2012-01-12 09:54:58 -07:00
Joel Dice
9ba7c504da Merge remote branch 'origin/SWT3.7_UrlUpdates' into oss-master 2011-12-29 11:00:59 -07:00
Seth Goings
51ae790e54 Added UrlTest.java to tests dir 2011-12-29 10:36:33 -07:00
Ben Limmer
d76191d2bb Adding unit tests for File.isAbsolute() method. 2011-12-29 10:17:01 -07:00
Seth Goings
a0c12ad259 Added another floatToIntBits test 2011-12-29 09:51:44 -07:00
Seth Goings
f5a168f584 Fixed tests for floatToIntBits. Probably want to add more comprehensive tests tomorrow (or today... as of 2 minutes) 2011-12-28 23:58:33 -07:00
Ben Limmer
b3850ac76d Initial attempt at resolving SWT3.7 missing operatons in Avian. Everything seems to be working except floatToIntBits, hence the test case failing. 2011-12-28 15:52:53 -07:00
Dain
c012e18a8b Add rudimentary support for http/https protocols in URL. 2011-12-02 15:46:36 -07:00