Commit Graph

3830 Commits

Author SHA1 Message Date
Joshua Warner
492294bfe6 Merge pull request #189 from jentfoo/interface_improvements
interface improvements and LockSupport implementation
2014-03-07 20:48:40 -07:00
Joshua Warner
f0fa06b3b7 Merge pull request #192 from dicej/inner-class-modifiers
match Java's schizophrenic concept of inner class access modifiers
2014-03-07 08:19:38 -07:00
Joel Dice
25d69f38ee match Java's schizophrenic concept of inner class access modifiers
An inner class has two sets of modifier flags: one is declared in the
usual place in the class file and the other is part of the
InnerClasses attribute.  Not only is that redundant, but they can
contradict, and the VM can't just pick one and roll with it.  Instead,
Class.getModifiers must return the InnerClasses version, whereas
reflection must check the top-level version.  So even if
Class.getModifiers says the class is protected, it might still be
public for the purpose of reflection depending on what the
InnerClasses attribute says.  Crazy?  Yes.
2014-03-06 16:17:43 -07:00
Mike Jensen
d94fc8f009 Fix for travis build failure for needing to initialize the new field in Thread. 2014-03-04 11:21:14 -07:00
Mike Jensen
d5e3acd7a5 Add parkBlocker variable to Thread.java 2014-03-03 16:45:28 -07:00
Mike Jensen
7dd799476a Interfaces and the foundation for a ReentrantLock implementation 2014-03-03 16:04:56 -07:00
Mike Jensen
b5dd74c3d8 Adds the Deque interface, and allows LinkedList to implement that interface.
This also changes ConcurrentLinkedQueue to implement the Queue interface, and just throw exceptions for operations which are not currently implemented.
2014-03-03 16:02:12 -07:00
Joshua Warner
6ed98b85f8 Merge pull request #188 from dicej/volatile
move Unsafe.get{Object|Int}Volatile from classpath-openjdk.cpp to builti...
2014-03-03 15:32:57 -07:00
Joel Dice
0a89683eff move Unsafe.get{Object|Int}Volatile from classpath-openjdk.cpp to builtin.cpp
This makes them available in all class libraries, not just the OpenJDK
library.  Note that I've also removed the unecessary idle statements,
per ab4adef.
2014-03-03 14:55:49 -07:00
Joel Dice
1cd822b23e Merge pull request #180 from joshuawarner32/move-allocator
Move allocator & Slice into util
2014-02-27 08:55:24 -07:00
Joshua Warner
e837502d43 Merge pull request #184 from dicej/zip-available
remove redundant decrement in ZipFile.getInputStream inner class
2014-02-26 15:55:48 -07:00
Joel Dice
2036eeaaa6 Merge pull request #182 from joshuawarner32/ffi-split
split out ffi::call from System
2014-02-26 15:46:05 -07:00
Joshua Warner
e6eead07fa call vm::dynamicCall directly, instead of through System 2014-02-26 15:10:41 -07:00
Joel Dice
094af1e794 remove redundant decrement in ZipFile.getInputStream inner class
We were decrementing the "remaining" field twice for each byte read
using the no-arg read method, which resulted in available() returning
a value that was too small.
2014-02-26 14:48:28 -07:00
Joshua Warner
53816970ea Merge pull request #183 from dicej/codesource
move OpenJDK.getProtectionDomain into Classes.java
2014-02-26 14:47:02 -07:00
Joel Dice
0c298eb513 move OpenJDK.getProtectionDomain into Classes.java
This way, apps can access the CodeSource of a class whether they're
using the OpenJDK class library or the Avian one.
2014-02-26 14:09:42 -07:00
Joshua Warner
deca71da52 build arm and powerpc targets in the ci build 2014-02-25 21:38:29 -07:00
Joshua Warner
2ac9070399 fix arm/powerpc build 2014-02-25 21:33:08 -07:00
Joshua Warner
db19c7b3a2 add Slice::resize and Slice::alloc 2014-02-25 20:34:03 -07:00
Joshua Warner
892d359ba0 use size_t for Vector::minimumCapacity 2014-02-25 20:34:03 -07:00
Joshua Warner
b711aef1b3 use Slice in Vector 2014-02-25 20:34:03 -07:00
Joshua Warner
a807966143 use Slice<uint8_t> in FixedAllocator 2014-02-25 20:34:03 -07:00
Joshua Warner
b083f3df04 move fixed allocator out of machine.h 2014-02-25 20:34:03 -07:00
Joshua Warner
f69f86b487 move Slice out of object-writer, to be more general 2014-02-25 20:34:03 -07:00
Joshua Warner
52b23b8a6a move Allocator to include, properly namespaced 2014-02-25 19:13:41 -07:00
Joshua Warner
d95a8a9626 Merge pull request #179 from dicej/android-thread-join
fix Thread.join when using Android class library
2014-02-25 15:20:21 -07:00
Joel Dice
1445835c4f fix Thread.join when using Android class library
Android's Thread.join expects the VM to null-out Thread.vmThread when
the thread exits.  Otherwise, it will block forever.
2014-02-25 14:58:32 -07:00
Joel Dice
3912f2c0e4 Merge pull request #171 from joshuawarner32/master
Flatten "vm" dir and split signal handling out of vm::System
2014-02-25 14:11:09 -07:00
Joshua Warner
2b17ba7766 Merge pull request #177 from dicej/VMSupportsCS8
add Avian_java_util_concurrent_atomic_AtomicLong_VMSupportsCS8
2014-02-24 14:21:51 -07:00
Joel Dice
c021329d0d add Avian_java_util_concurrent_atomic_AtomicLong_VMSupportsCS8
Android's class library uses this to find out whether the VM supports
compareAndSwapLong natively.  Avian does on all platforms, so we just
return true.
2014-02-24 14:16:40 -07:00
Joel Dice
3ce78cf8c1 Merge pull request #176 from joshuawarner32/shift-32-bit-regression
fix #172, regression in compiling shift operations
2014-02-24 13:55:26 -07:00
Joshua Warner
f1806ce90e fix #172, regression in compiling shift operations 2014-02-24 13:24:14 -07:00
Joshua Warner
aec8bfc308 Merge pull request #174 from dicej/lIphlpapi
add "-lIphlpapi" to embedding example link command
2014-02-24 12:00:13 -07:00
Joel Dice
2689ec79a3 add "-lIphlpapi" to embedding example link command
This is needed to allow the link to succeed when doing an openjdk-src
build on Windows.
2014-02-24 08:37:42 -07:00
Joshua Warner
3bd00f19bc fix remote-test functionality for windows 2014-02-22 15:35:12 -07:00
Joshua Warner
bc9f7d2f87 refactor SignalRegistrar interface 2014-02-21 23:37:32 -07:00
Joshua Warner
ca7d51edb3 add crash function to match the semantics of System::abort 2014-02-21 23:37:28 -07:00
Joshua Warner
730dade53e break out signal handling from System 2014-02-21 23:36:40 -07:00
Joshua Warner
5ffdfecdc2 remove vm from code paths, to match namespacing 2014-02-21 13:32:28 -07:00
Joshua Warner
4a436bad80 Merge pull request #170 from l1m5/master
Change ConcurrentLinkedQueue.poll(boolean remove) to private.
2014-02-11 15:30:13 -07:00
Ben Limmer
d9ce351a24 Change ConcurrentLinkedQueue.poll(boolean remove) to private.
Since it's not available in the Oracle classpath.
Closes #169.
2014-02-11 14:55:29 -07:00
Joshua Warner
295ed07d05 Merge pull request #167 from dicej/master
do not omit calls to empty methods which may trigger class initializatio...
2014-02-10 18:37:07 -07:00
Joel Dice
1735a7976a do not omit calls to empty methods which may trigger class initialization
There's a small optimization in compileDirectInvoke which tries to
avoid generating calls to empty methods.  However, this causes
problems for code which uses such a call to ensure a class is
initialized -- if we omit that call, the class may not be
initialized and any side effects of that initialization may not
happen when the program expects them to.

This commit ensures that the compiler only omits empty method calls
when the target class does not need initialization.  It also removes
commented-out code in classpath-openjdk.cpp which was responsible for
loading libmawt proactively; that was a hack to get JogAmp to work
before we understood what the real problem was.
2014-02-10 08:40:14 -07:00
Joel Dice
07abed9c65 Merge pull request #166 from joshuawarner32/master
Improve c++ unit test harness
2014-02-09 15:16:38 -07:00
Joshua Warner
68bb65cb91 improve c++ test harness 2014-02-09 14:02:44 -07:00
Joshua Warner
0dbe225049 add sublimetext files to gitignore 2014-02-09 13:58:40 -07:00
Joel Dice
15d9128d2d Merge pull request #164 from joshuawarner32/master
implement Arrays.deepEquals and Objects.deepEquals
2014-02-05 11:30:03 -07:00
Joshua Warner
02becdb5bf implement Arrays.deepEquals and Objects.deepEquals 2014-01-30 17:12:34 -07:00
Joshua Warner
9f505f8522 Merge pull request #163 from soc/topic/java-util-objects
Implement java.util.Objects
2014-01-30 15:43:50 -08:00
Simon Ochsenreither
57d34808c3 Implement java.util.Objects 2014-01-29 02:10:22 +01:00