Commit Graph

213 Commits

Author SHA1 Message Date
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
d5f4811b43 check for exception after calling resolveClass in parseInterfaceTable 2009-08-04 08:50:04 -06:00
Joel Dice
f8bf83bfec fix recent regression in findInHierarchy 2009-08-04 08:42:16 -06:00
Joel Dice
cb563f76e1 check superinterfaces when looking up methods and fields 2009-08-03 16:16:41 -06:00
Joel Dice
ad0592df6f print class name properly when throwing NoSuchMethodError 2009-07-29 10:32:16 -06:00
Joel Dice
7b183e8f4e don't run Java finalizers when exiting the VM 2009-07-28 16:58:01 -06:00
Joel Dice
27d863790c Merge branch 'win64' into gnu
Conflicts:

	makefile
	src/compile-x86.S
	src/x86.S
	src/x86.cpp
2009-07-25 20:48:36 -06:00
Joel Dice
3787985b25 implement basic finalization support
This implementation does not conform to the Java standard in that
finalize methods are called from whichever thread happens to be garbage
collecting, and that thread may hold locks, whereas the standard
guarantees that finalize will be run from a thread which holds no locks.
Also, an object will never be finalized more than once, even if its
finalize method "rescues" (i.e. makes reachable) the object such that it
might become unreachable a second time and thus a candidate for
finalization once more.  It's not clear to me from the standard if this
is OK or not.

Nonwithstanding the above, this implementation is useful for "normal"
finalize methods which simply release resources associated with an
object.
2009-07-21 18:57:55 -06:00
Joel Dice
514d0bf7e5 fix deadlocks and other misbehaviors in class initialization code 2009-07-20 14:12:38 -06:00
Joel Dice
138f8444df Merge branch 'master' into gnu 2009-07-20 08:27:33 -06:00
Joel Dice
8662361f71 Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-07-20 08:27:17 -06:00
Joel Dice
47ab980550 fix thread heap overflow corner case in allocate3
The previous code relied on the invalid assumption that the thread-local
heaps for all threads would have been cleared immediately following a
garbage collection.  However, the last thing the garbage collection
function does is run finalizers which may allocate new objects.  This
can lead allocate3 to call allocateSmall with a size which is too large
to accomodate, overflowing the heap.

The solution is to iterate until there really is enough room for the
original allocation request.
2009-07-17 19:37:46 -06:00
Joel Dice
3e4336eba4 rearrange finalization code in collect to avoid inifinite recursion when finalizer allocates memory 2009-07-17 09:29:24 -06:00
Joel Dice
9c9eb86b2f fix deadlock in allocate3 when another thread wants to enter the exclusive state 2009-07-16 11:51:35 -06:00
Josh warner
9681a8a1ff added debugging method 'vmAddressFromLine' 2009-06-11 09:44:37 -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
c1ca653fef intern CONSTANT_Utf8 pool entries to save memory and reduce bootimage size 2009-06-06 18:26:23 -06:00
Joel Dice
ac34bc072c remove obsolete todo comments 2009-06-06 14:58:06 -06:00
Joel Dice
0857f53651 more progress on GNU Classpath compatibility 2009-06-04 17:21:42 -06:00
Joel Dice
98be5c509e more progress towards GNU Classpath compatibility 2009-06-03 16:17:55 -06:00
Joel Dice
ba5105c374 throw NoSuchMethodError in resolveMethod if method not found 2009-06-02 18:55:12 -06:00
Joel Dice
398dec58bb GC bugfixes 2009-05-17 17:43:48 -06:00
Joel Dice
8cb59c9d4c various bugfixes to get Continuations test working 2009-05-16 02:03:03 -06:00
Joel Dice
eb3bd25aa1 code cleanup and build fixes 2009-05-04 19:04:17 -06:00
Joel Dice
0cd4eb2655 early sketch of continuation support 2009-05-03 14:57:11 -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
2ca8132d97 implement support for volatile fields 2009-03-02 20:18:15 -07:00
Joel Dice
a1ec71423e Merge branch 'master' into powerpc
Conflicts:

	makefile
	src/assembler.h
	src/binaryToMacho.cpp
	src/compile.cpp
	src/compiler.cpp
	src/x86.cpp
2009-02-09 16:22:01 -07:00
Joel Dice
54ad7c4e98 tolerate ConstantValue attributes on non-static fields, since the compiler ensures that they are initialized in any constructors for that class (i.e., the VM does not need to do anything special to initialize them) 2009-01-10 12:25:52 -07:00
Joel Dice
58a90f2b84 fix regressions for non-bootimage case 2008-12-03 19:09:57 -07:00
Joel Dice
25ade1484a lots of bugfixes and refactoring 2008-12-01 19:38:00 -07:00
Joel Dice
eaf30eb909 fix static class initialization when using a boot image 2008-11-29 21:58:09 -07:00
Joel Dice
e44f326377 various bugfixes 2008-11-29 18:39:42 -07:00
Joel Dice
0ec5ad3701 update makefile to optionally build and use a boot image; various bugfixes 2008-11-29 16:08:14 -07:00
Joel Dice
0ef2ee1d02 refactor Segment::Map to support map data which is not allocated as part of the segment data 2008-11-29 13:37:03 -07:00
Joel Dice
702525fd32 support immortal heap area in heap.cpp 2008-11-28 19:31:06 -07:00
Joel Dice
4d1af63ed2 initial work on booting from boot image 2008-11-28 15:02:45 -07:00
Joel Dice
61ecb56e21 Merge branch 'master' of oss:/var/local/git/avian into powerpc 2008-11-25 16:19:21 -07:00
Joel Dice
035aa0ecd4 Merge branch 'master' of oss.readytalk.com:/var/local/git/avian into bootimage
Conflicts:

	src/compile.cpp
	src/machine.h
	src/util.h
2008-11-23 17:02:34 -07:00
Joel Dice
207f093464 never trigger a GC due to an immortal allocation 2008-11-23 11:48:39 -07:00
Joel Dice
fb9b2bf173 avoid creating garbage when iterating over hashmaps 2008-11-22 16:38:41 -07:00
Joel Dice
8a7852172e increase heap pool size and fixed footprint threshold constants based on performance profiling and experimentation 2008-11-22 14:47:18 -07:00
Joel Dice
6500f1eff6 initial work to support boot image creation and use 2008-11-21 16:20:35 -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
Joel Dice
4d613f404f use dbghelp.dll to generate crash dump file on Windows XP and later
The dump is written to the directory specified via the avian.crash.dir
system property if that property is set and is not written otherwise.
2008-10-27 15:13:27 -06:00
Joel Dice
003afdc918 fix heap dump facility to visit all roots 2008-10-24 18:48:10 -06:00
Joel Dice
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
Joel Dice
07daa9be51 free properties array in Machine::dispose 2008-09-30 17:03:13 -06:00
Joel Dice
ac988f7a0d fix static field lookup from interfaces 2008-09-26 18:17:13 -06:00