Joel Dice
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
Joel Dice
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
Joel Dice
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
Joel Dice
4034a219d0
do nothing in System.arraycopy if length <= 0
...
Previously, we risked segfaults by passing negative numbers to memcpy.
This commit also makes arraycopy throw an IndexOutOfBounds exception
instead of an ArrayStoreException if the specified offsets and lengths
would take us outside the bounds of one or both of the arrays, per the
Sun documentation.
2010-07-13 18:40:29 -06:00
Joel Dice
664cb3cd39
don't try to parse annotation tables more than once; use defining classloader when loading array classes during linking
2009-12-24 17:58:48 -07:00
Joel Dice
f588a62ae3
fix Classpath 0.98 compatibility issues
2009-12-22 21:34:04 -07:00
Joel Dice
5a0e00ca39
GC safety bugfix
2009-12-01 22:41:12 -07:00
Joel Dice
f27ecaa199
fix memcpy argument order in Avian_avian_Singleton_getLong
2009-10-20 13:38:05 -06:00
Joel Dice
87950e86b8
add missing parameter to native SystemClassLoader methods
2009-10-13 18:42:49 -06:00
Joel Dice
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
Joel Dice
1a2eb3836c
Merge branch 'master' of oss.readytalk.com:/var/local/git/avian
2009-09-18 18:01:57 -06:00
Joel Dice
7aa906d97b
support runtime-visible annotations and java.lang.reflect.Proxy
2009-09-18 18:01:54 -06:00
Joel Dice
1dfa421a6c
fix argument mixup in Runtime.exit
2009-09-17 18:28:42 -06:00
Joel Dice
6519047342
fix bootimage build
2009-09-03 09:06:04 -06:00
Joel Dice
27f35bf239
fix heapdump build
2009-09-01 12:15:33 -06:00
Joel Dice
73dc058c14
implement StackTraceElement.getFileName properly
2009-08-27 16:28:44 -06:00
Joel Dice
1a0eef7e2d
add support for building with MSVC on Windows
2009-08-26 18:26:44 -06:00
Joel Dice
4297fa04b3
run java finalizers in a separate thread to guarantee no application locks are held when doing so
2009-08-24 17:51:31 -06:00
Joel Dice
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
Joel Dice
c4edabdc02
implement ClassLoader.resolveClass and ensure class is linked in e.g. Class.getMethods; minor bugfixes
2009-08-18 14:26:28 -06:00
Joel Dice
8ac06d8a47
initialize classloader map if necessary in Avian_java_lang_ClassLoader_defineClass
2009-08-11 09:25:35 -06:00
Joel Dice
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
Joel Dice
c3a8ca505c
avoid function pointer cast warning from GCC 3.4
2009-08-03 10:56:43 -06:00
Joel Dice
e72ff8db0b
Merge branch 'master' into gnu
...
Conflicts:
src/compile.cpp
2009-07-11 12:11:59 -06:00
Joel Dice
ab5ba9c954
Merge branch 'master' of oss.readytalk.com:/var/local/git/avian
2009-07-10 09:57:29 -06:00
Joel Dice
525318dabb
fix GC safety bug in builtin.cpp
2009-06-11 17:13:25 -06:00
Joel Dice
f239424930
implement NewDirectByteBuffer etc. properly when building against Classpath; call JNI_OnLoad if found in newly-loaded libraries
2009-06-10 18:15:00 -06:00
Joel Dice
20ea82ec2e
various tweaks for Classpath compatibility
2009-06-06 20:32:44 -06:00
Joel Dice
db09adc0d4
allow copies between object arrays of different types in System.arraycopy
2009-06-04 17:19:48 -06:00
Joel Dice
c434f211e2
fix return type for Avian_java_lang_Object_hashCode
2009-05-31 17:19:18 -06:00
Joel Dice
31d9700c9b
move SystemClassLoader and Runtime.dumpHeap to avian package
2009-05-25 21:36:29 -06:00
Joel Dice
758325ae27
convert methods in builtin.cpp to use fast native calling convention
2009-05-25 20:02:25 -06:00
Joel Dice
4305fdc7f3
begin dynamicWind implementation
2009-05-23 16:15:06 -06:00
Joel Dice
8cb59c9d4c
various bugfixes to get Continuations test working
2009-05-16 02:03:03 -06:00
Joel Dice
66c4867f18
more work on continuation support
2009-05-05 18:29:05 -06:00
Joel Dice
d1018bf078
update copyright years
2009-03-15 12:02:36 -06:00
Joel Dice
6e6035505c
zero heap space ahead of time when allocating raw storage and garbage collecting, not when allocating individual objects
...
This helps us support the Java Memory Model without adding a memory
barrier to every object allocation. It's also potentially more
efficient, since we zero out each heap segment all at once instead of
bit-by-bit with each object allocation.
2009-03-03 20:05:48 -07:00
Joel Dice
c80eb51c17
Merge branch 'master' into powerpc
...
Conflicts:
makefile
src/assembler.h
src/compile.cpp
src/compiler.cpp
src/compiler.h
src/finder.cpp
2008-11-11 08:21:48 -07:00
Eric Scharff
13a535d1c6
Added a getContentLength() method to URLConnection
...
This is particularly important if you want to get the number of bytes of a
resource loaded by the class loader:
getClass().getResource("myFile").openConnection().getContentLength()
2008-07-15 09:36:52 -06:00
Joel Dice
ebb498587f
enter exclusive state in collect function instead of requiring caller to enter that state before calling
2008-05-05 07:04:53 -06:00
Joel Dice
df5258d1d8
various bugfixes concerning Thread.getStackTrace
2008-04-21 16:36:13 -06:00
Joel Dice
95e5f8203c
enter active state before generating stack trace in Thread.getTrace
2008-04-15 23:27:42 -06:00
Joel Dice
0d3e6b7793
simplify memory allocation interfaces
2008-04-13 12:15:04 -06:00
Joel Dice
d9ec8e20bf
implement Thread.getStackTrace, activeCount, and enumerate
2008-04-11 16:48:39 -06:00
Joel Dice
fbc5463fb1
specify Avian version via a macro defined in makefile
2008-03-06 13:30:26 -07:00
Joel Dice
85abd14137
change avium.version to avian.version
2008-02-20 08:13:15 -07:00
Joel Dice
2edaa82801
prepend copyright notice and license to all source files; add license.txt and readme.txt
2008-02-19 11:06:52 -07:00
Joel Dice
34cc390286
fix uninitialized variable warning
2008-01-29 10:02:58 -07:00
Joel Dice
d693393293
remove Machine::lastLibrary and rename firstLibrary to libraries
2008-01-29 08:19:15 -07:00
Joel Dice
e403a625d1
second try to fix library symbol lookup
2008-01-25 16:38:26 -07:00