Commit Graph

229 Commits

Author SHA1 Message Date
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
d0d53e2e10 fix custom-classloader-related concurrency problems and other bugs
The main changes in this commit ensure that we don't hold the global
class lock when doing class resolution using application-defined
classloaders.  Such classloaders may do their own locking (in fact,
it's almost certain), making deadlock likely when mixed with VM-level
locking in various orders.

Other changes include a fix to avoid overflow when waiting for
extremely long intervals and a GC root stack mapping bug.
2010-09-16 20:49:02 -06:00
d819a75f36 more work towards OpenJDK classpath support
The biggest change in this commit is to split the system classloader
into two: one for boot classes (e.g. java.lang.*) and another for
application classes.  This is necessary to make OpenJDK's security
checks happy.

The rest of the changes include bugfixes and additional JVM method
implementations in classpath-openjdk.cpp.
2010-09-14 10:49:41 -06:00
cddea7187d preliminary support for using OpenJDK's class library
Whereas the GNU Classpath port used the strategy of patching Classpath
with core classes from Avian so as to minimize changes to the VM, this
port uses the opposite strategy: abstract and isolate
classpath-specific features in the VM similar to how we abstract away
platform-specific features in system.h.  This allows us to use an
unmodified copy of OpenJDK's class library, including its core classes
and augmented by a few VM-specific classes in the "avian" package.
2010-09-10 15:05:29 -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
4273ff834c remove uncessary parentheses from Enum.java 2010-09-01 10:10:11 -06:00
4169425307 add error classes 2010-08-16 09:23:48 -06:00
a50fda1a5e add ClassLoader.getResources calls 2010-08-16 09:23:48 -06:00
1b31fb67e1 Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2010-06-15 18:27:51 -06:00
JET
b2f5e71d22 ARM and UTF-8 work 2010-04-14 09:26:50 -06:00
a650f1affa provide more useful message when throwing exception from Field.set 2010-03-07 12:03:17 -07:00
5d781a0584 declare Long.MAX_VALUE and Long.MIN_VALUE as longs, not Longs 2010-02-02 09:33:10 -07:00
f588a62ae3 fix Classpath 0.98 compatibility issues 2009-12-22 21:34:04 -07:00
70da0df46b add Class.getExceptionTypes method 2009-12-15 10:04:51 -07:00
6118792ffd update copyright years 2009-12-02 19:08:29 -07:00
f39469e71c Changes for better memory managment 2009-12-01 09:54:36 -07:00
2efff818ea Merge commit 'origin/master' into wip 2009-10-27 09:17:54 -06:00
a68742200b return empty stack trace for thread which isn't running 2009-10-26 11:44:29 -06:00
5967246b37 Merge commit 'origin/master' into wip 2009-10-20 14:15:35 -06:00
53588b94f3 compare lengths first in String.equals[IgnoreCase] for efficiency 2009-10-19 10:36:48 -06:00
1faf93c163 fix typo in Proxy.makeInvokeCode 2009-09-19 16:27:28 -06: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
987330fed5 Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-08-28 16:18:36 -06:00
cd41751912 ensure primitive names are zero-terminated in Class.getName 2009-08-28 16:17:23 -06:00
73dc058c14 implement StackTraceElement.getFileName properly 2009-08-27 16:28:44 -06:00
77ae259e41 throw ClassCastException if asked to compare Enums of different types 2009-08-21 16:06:12 -06:00
71f1efc4cb add a couple of StringBuffer.append overloads 2009-08-20 08:59:22 -06:00
c4b5ecec90 implement Runtime.addShutdownHook and Thread.setDaemon; avoid segfaults due to an application calling e.g. CallStaticBooleanMethod when it really meant CallStaticVoidMethod 2009-08-19 14:27:03 -06:00
c4edabdc02 implement ClassLoader.resolveClass and ensure class is linked in e.g. Class.getMethods; minor bugfixes 2009-08-18 14:26:28 -06:00
6d54b6cec8 add classes which I meant to add in earlier commits 2009-08-14 08:51:10 -06:00
9553d56977 add AccessibleObject.setAccessible(AccessibleObject[],boolean) 2009-08-13 09:03:44 -06:00
f96fa82607 add methods to Throwable 2009-08-13 09:03:04 -06:00
017116d060 add ThreadGroup(String) constructor 2009-08-13 09:02:32 -06:00
0d7a2fa2bc add methods to StringBuilder and fix logic error in getChars 2009-08-13 09:02:00 -06:00
ae02212dd9 add a few methods to String; support ISO-8859-1 charset 2009-08-13 09:00:07 -06:00
864a28f2ce throw IllegalArgumentException from Enum.valueOf if name does not match any value 2009-08-13 08:57:58 -06:00
fb37f48237 add various methods to Class and fix getComponentType for primitive arrays 2009-08-13 08:57:06 -06:00
0544ab381f fix Class.isArray for case this == Class.class 2009-08-12 19:40:52 -06:00
dd82b58dad add String.lastIndexOf(String,int); defer to Pattern.split in String.split 2009-08-12 19:39:29 -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
d868815737 put thread into runnable state in Thread.start 2009-08-10 17:36:11 -06:00
001000364d add classloader parameter to functions which may directly or indirectly load classes; include methods inherited from interfaces (but not explicitly declared) in method tables and virtual tables of abstract classes 2009-08-10 07:56:16 -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
5c72746d2c inherit thread group from current thread 2009-08-10 07:46:59 -06:00
97ea23e3bb optionally specify classloader to Class.forCanonicalName 2009-08-10 07:46:05 -06:00
1a2deff97d Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-08-09 14:43:53 -06:00
6d27274aea update Class.PrimitiveFlag value to reflect change in machine.h; make Class.getName work for primitive types 2009-08-05 15:57:51 +00:00
2de750768b add java.lang.reflect.Modifier.isInterface 2009-08-05 14:14:45 +00:00
7050448ec5 implement Class.{get|set}Signers 2009-08-04 18:31:14 -06:00