Commit Graph

58 Commits

Author SHA1 Message Date
Joel Dice
a098926547 run Shutdown.shutdown on exit when using OpenJDK library
The OpenJDK library wants to track and run the shutdown hooks itself
rather than let the VM do it, so we need to tell it when we're
exiting.

Also, in machine.cpp we need to use only the modifiers specified in
the InnerClasses attribute for inner classes rather than OR them with
the flags given at the top level of the class file.
2013-04-19 13:00:47 -06:00
Joel Dice
81d7786716 fix Class.getModifiers for inner classes and implement JVM_GetDeclaringClass and JVM_GetEnclosingMethodInfo properly
This fixes a couple of tests in the Scala test suite
(run/reflection-modulemirror-toplevel-badpath.scala and
run/reflection-constructormirror-nested-good.scala).
2013-04-17 15:12:58 -06:00
Joel Dice
3309a9f4ad ensure that array classes implement Cloneable and Serializable in bootimage build 2013-03-15 13:26:18 -06:00
Joel Dice
1890e348fb fix handling of classe, method, and field names with non-ASCII characters 2013-02-03 14:10:47 -07:00
Joel Dice
c6ac66e45a fix bug in isAssignableFrom such that primitive array types were considered to be subclasses of the Object array type 2012-02-27 18:16:01 -07:00
Joel Dice
51c56c1b3c add PrintStream.print[ln] overloads for primitives and char arrays 2011-01-20 08:26:56 -07:00
Joel Dice
4f23601b56 fix corner cases which led to crashes in JIT compiler
Compiling the entire OpenJDK class library into a bootimage revealed
some corner cases which broke the compiler, including synchronization
in a finally block and gotos targeting the first instruction of an
unsynchronized method.
2010-11-26 12:36:43 -07:00
Joel Dice
75de0a621b fix windows.cpp MySystem::now 2010-11-07 12:35:31 -07:00
Joel Dice
d0a6096eb0 add support for accessing embedded JARs as if they were directories
This allows OpenJDK to access time zone data which is normally found
under java.home, but which we must embed in the executable itself to
create a self-contained build.  The VM intercepts various file
operations, looking for paths which start with a prefix specified by
the avian.embed.prefix property and redirecting those operations to an
embedded JAR.

For example, if avian.embed.prefix is "/avian-embedded", and code
calls File.exists() with a path of
"/avian-embedded/javahomeJar/foo.txt", the VM looks for a function
named javahomeJar via dlsym, calls the function to find the memory
region containing the embeded JAR, and finally consults the JAR to see
if the file "foo.txt" exists.
2010-11-05 13:18:28 -06:00
Joel Dice
1d4b54a9f6 fix failure to add abstract virtuals to class with no declared virtuals 2010-09-25 16:35:18 -06:00
Joel Dice
45476eb591 fix handling of volatile longs and doubles on PowerPC
We were miscompiling methods which contained getfield, getstatic,
putfield, or putstatic instructions for volatile 64-bit primitives on
32-bit PowerPC due to not noticing that values in registers are clobbered
across function calls.

The solution is to create a separate Compiler::Operand instance for each
object monitor reference before and after the function call to avoid
confusing the compiler.  To avoid duplicate entries in the constant pool,
we add code look for and, if found, reuse any existing entry for the same
constant.
2010-01-27 17:46:04 -07:00
Joel Dice
20c1ea08e6 remove a test from Misc.java since it's been moved to Strings.java 2009-08-14 08:53:33 -06:00
Joel Dice
8410e1d683 ensure reads and writes of volatile 64-bit fields are atomic 2009-03-03 18:02:11 -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
29616c4abc freeze target site when using temporary in maybeMove 2009-02-08 18:58:33 -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
b23f7374e9 don't steal sites in pickJunctionSite 2008-12-20 17:45:52 -07:00
Joel Dice
d50febe088 various control-flow related bugfixes 2008-12-11 18:09:36 -07:00
Joel Dice
cae5202be0 split Misc.java into four separate files 2008-11-10 17:07:15 -07:00
Joel Dice
e0e827596e make Long.parseLong more efficient 2008-08-29 11:37:53 -06:00
Joel Dice
a016eeaba0 fix Long.toString for Long.MIN_VALUE case 2008-07-13 17:54:44 -06:00
Joel Dice
107ac01304 fix addCR and subtractCR for cases of 64-bit constants on amd64 2008-07-02 08:52:35 -06:00
Joel Dice
e9c37f5ffd add more tests of operations on longs to Misc.java 2008-06-12 11:00:43 -06:00
Joel Dice
fc8c5a2ea9 fix a few bugs revealed by ProGuard optimizations, including too-early constant propagation during array loads and stores 2008-06-10 08:49:13 -06:00
Joel Dice
3326aafdac various 32-bit fixes 2008-05-22 11:15:18 -06:00
Joel Dice
21cb1c3c8f remove Event::validate, since it is no longer needed and actually causes trouble 2008-05-20 16:47:53 -06:00
Joel Dice
36dbf1ad14 fix another local variable caching bug 2008-05-20 15:24:10 -06:00
Joel Dice
d604efd8f5 fix local variable caching bug 2008-05-20 13:11:42 -06:00
Joel Dice
c9f06933e2 test long addition and subtraction in Misc, as well as multidimensional array creation 2008-05-18 09:45:52 -06:00
Joel Dice
b6b84af123 various bugfixes 2008-05-17 21:32:14 -06:00
Joel Dice
7f72a6469d more register marshalling bugfixes; simple swt apps now run on amd64 2008-05-15 17:19:23 -06:00
Joel Dice
bbd1ee5540 various register marshalling bugfixes 2008-05-15 14:00:57 -06:00
Joel Dice
bf08cc4c53 fix array bounds checks 2008-04-30 11:47:25 -06:00
Joel Dice
918193fa60 fix 32-bit right unsigned shifts on amd64 2008-04-30 11:15:21 -06:00
Joel Dice
e2b24263a2 various bugfixes 2008-04-30 09:44:17 -06:00
Joel Dice
1b5f14d847 re-enable tests in Misc and get them working 2008-04-28 09:53:48 -06:00
Joel Dice
d6c3b2327f bugfixes; enums test now succeeds 2008-04-20 13:35:36 -06:00
Joel Dice
525f733171 Merge branch 'master' into compiler
Conflicts:

	src/compile.cpp
	src/compiler.cpp
	src/compiler.h
2008-04-13 13:48:20 -06:00
Joel Dice
907382bcee fix broken field alignment in parseFieldTable which caused longs to overlap other fields on 32-bit systems in certain cases 2008-03-31 18:34:57 -06:00
Joel Dice
9e2e614a15 various fixes to get invokevirtual working 2008-03-10 16:37:21 -06:00
Joel Dice
d654c943f3 various bugfixes and tweaks in new compiler, primarily related to duplicating stack operands 2008-02-17 13:57:40 -07:00
Joel Dice
b9fa7179d9 more work on new compiler; addition now works 2008-02-11 17:20:32 -07:00
Joel Dice
88a8e74a53 fix register to memory mov1 implementation 2008-01-18 15:01:50 -07:00
Joel Dice
f0d556b0ec fix handling of call target resolution for non-virtual calls 2008-01-11 15:16:24 -07:00
Joel Dice
a9a0252209 add another test to Misc.java 2008-01-10 15:47:54 -07:00
Joel Dice
4c938d496e fix 64-bit bitshifts on 32-bit systems 2008-01-10 13:47:55 -07:00
Joel Dice
5d65e7c220 handle synchronized methods properly in JIT mode 2007-12-27 17:02:05 -07:00
Joel Dice
796a64a426 lots of JIT bugfixes and cleanups 2007-12-15 17:24:15 -07:00
Joel Dice
b2147c2c99 lots of JIT bugfixes and a few new instructions 2007-12-12 15:19:13 -07:00
Joel Dice
fab77e4d96 don't call prologue and epilogue from compileDefault, since we want the original rbp and rsp values 2007-12-11 18:19:03 -07:00