Commit Graph

37 Commits

Author SHA1 Message Date
2a43e68c16 fix all the bugs
So there I was, planning to just fix one little bug: Thread.holdsLock
and Thread.yield were missing for the Android class library.  Easy
enough, right?  So, I added a test, got it passing, and figured I'd go
ahead and run ci.sh with all three class libraries.  Big mistake.

Here's the stuff I found:

 * minor inconsistency in README.md about OpenSSL version

 * untested, broken Class.getEnclosingMethod (reported by Josh)

 * JNI test failed for tails=true Android build

 * Runtime.nativeExit missing for Android build

 * obsolete assertion in CallEvent broke tails=true Android build

 * obsolete superclass field offset padding broke bootimage=true Android build

 * runtime annotation parsing broke bootimage=true Android build
   (because we couldn't modify Addendum.annotationTable for classes in
   the heap image)

 * ci.sh tried building with both android=... and openjdk=..., which
   the makefile rightfully balked at

Sorry this is all in a single commit; I didn't expect so many
unrelated issues, and I'm too lazy to break them apart.
2014-07-12 16:57:24 -06:00
9b7d0d1624 update copyright years 2014-04-23 15:33:41 -06:00
abe8bc6fda fix exception wrapping for Method.invoke and static initializers
Method.invoke should initialize its class before invoking the method,
throwing an ExceptionInInitializerError if it fails, without wrapping
said error in an InvocationTargetException.

Also, we must initialize ExceptionInInitializerError.exception when
throwing instances from the VM, since OpenJDK's
ExceptionInInitializerError.getCause uses the exception field, not the
cause field.
2013-12-05 22:28:13 -07:00
58ec623d7a Implement Method#getDefaultValue()
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-11-26 15:28:13 -06:00
526dd574d9 Add the Method#isVarArgs method
Required by bleeding-edge Beanshell...

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-10-25 15:32:33 -05:00
87b02eb949 update copyright years
Previously, I used a shell script to extract modification date ranges
from the Git history, but that was complicated and unreliable, so now
every file just gets the same year range in its copyright header.  If
someone needs to know when a specific file was modified and by whom,
they can look at the Git history themselves; no need to include it
redundantly in the header.
2013-07-02 20:52:38 -06:00
8546ca5670 fix Avian classpath build 2013-02-22 11:55:01 -07:00
42d39b1af1 more Android class library work 2013-02-21 15:37:17 -07:00
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
a5742f5985 update copyright years 2010-12-05 20:21:09 -07:00
c1c9d2111b remove GNU Classpath and Apache Harmony compatibility code
Rather than try to support mixing Avian's core classes with those of
an external class library -- which necessitates adding a lot of stub
methods which throw UnsupportedOperationExceptions, among other
comprimises -- we're looking to support such external class libraries
in their unmodified forms.  The latter strategy has already proven
successful with OpenJDK's class library.  Thus, this commit removes
the stub methods, etc., which not only cleans up the code but avoids
misleading application developers as to what classes and methods
Avian's built-in class library supports.
2010-09-27 15:58:02 -06:00
17c1a552d5 break each Class, Field, and Method into separate classes
In order to facilitate making the VM compatible with multiple class
libraries, it's useful to separate the VM-specific representation of
these classes from the library implementations.  This commit
introduces VMClass, VMField, and VMMethod for that purpose.
2010-09-01 10:13:52 -06:00
6118792ffd update copyright years 2009-12-02 19:08:29 -07:00
953cb69e5e move proxy and annotation code from C++ to Java
This allows code shrinkers to remove it if it's not used by the application.
2009-09-19 16:21:15 -06:00
7aa906d97b support runtime-visible annotations and java.lang.reflect.Proxy 2009-09-18 18:01:54 -06:00
df1aee5981 replace slashes with dots in class name passed to Class.forName in Method.getParameterTypes 2009-08-11 09:25:05 -06:00
58c3a37277 specify classloader when calling Class.forCanonicalName in Field and Method; tolerate null argument array in Method.invoke 2009-08-10 07:48:44 -06:00
e18ab49f4d always pass null instance to native version of Method.invoke when invoking static methods 2009-08-04 18:30:16 -06:00
0615b8a09f add classes and methods needed for GNU Classpath compatibility
Most of these methods are stubs which throw
UnsupportedOperationExceptions for now.
2009-06-02 17:14:38 -06:00
20cf42c5e4 more work on boot image creation 2008-11-23 16:58:01 -07:00
6a5116e7a7 implement primitive heap dump facility for memory profiling, accessible via Runtime.dumpHeap
The proper way to do this is to implement a subset of JVMTI, but this
will do the job for now.
2008-10-21 17:38:20 -06:00
c8cc7d931b maintain a table to look up methods called via JNI
This simplifies the JNI implementation for looking up methods.  It also
fixes a bug where an applications calls GetStaticMethodID with class A
and then calls CallStatic<Type>Method with class B which extends A.  The
old code would look in the wrong method table and thus call the wrong
method.
2008-08-15 12:32:33 -06:00
2edaa82801 prepend copyright notice and license to all source files; add license.txt and readme.txt 2008-02-19 11:06:52 -07:00
b71d5104ba snapshot 2007-11-01 13:24:09 -06:00
404d996c1e snapshot 2007-10-03 18:41:54 -06:00
2f3f97d550 clean up compile.cpp and support both x86_64 and i386; further refactoring to support JIT 2007-09-26 17:23:03 -06:00
1207989f72 fix build and runtime bugs introduced in last commit 2007-09-26 08:43:40 -06:00
5e42158f4b add misc methods to classpath 2007-09-13 20:19:44 -06:00
e2f3e80bdf heap o' bugfixes 2007-08-19 20:57:32 -06:00
aa5e751e69 clean up Array.get(), Array.set(), and Method.invoke() implementations 2007-08-18 11:53:30 -06:00
ab3ca38580 various bugfixes 2007-08-13 18:37:00 -06:00
38d4ee6e07 flesh out ClassLoader, etc. 2007-07-30 17:19:05 -06:00
abd9c2bc8d fix primitive class resolution to avoid mistaking normal classes with names like 'B' for primitive classes 2007-07-28 10:55:24 -06:00
823d764998 working reflection 2007-07-23 21:16:59 -06:00
5f3bf175e0 start work on reflection; bugfixes 2007-07-23 19:44:20 -06:00
fd770fd884 sketch a few more classpath classes 2007-07-21 14:44:39 -06:00
48226f988c add a bunch of classes to classpath and flesh out a few existing ones 2007-07-21 11:50:26 -06:00