Commit Graph

2772 Commits

Author SHA1 Message Date
Matt Klich
39c1361ef2 Merge branch 'B14038_Lion_appshare' into release_6.3.3 2011-06-02 15:27:13 -06:00
Matt Klich
698138f649 OSX Lion build changes
Added JavaVM to include path. Also allow dynamically building with
different SDK versions through the OSX_SDK_VERSION and OSX_SDK_SYSROOT
environment variables (these default to the previosly hardcoded value of
10.4 and 10.4u respectively).
2011-06-02 15:15:08 -06:00
Matt Klich
c7c0a45a61 Revert "OSX Lion build changes"
This commit introduced conditional includes which is not the preferred
method. Will do it in the makefile instead.

This reverts commit 7148556979.
2011-06-01 13:56:03 -06:00
Joel Dice
4514833700 Changes to add end function to Inflater and Deflater per the java spec 2011-05-31 14:46:15 -06:00
Mike Jensen
6b4b4b0b8c Changes to add end function to Inflater and Deflater per the java spec 2011-05-31 14:31:06 -06:00
Joel Dice
92adc83caf remove NPE debug logging 2011-05-29 11:16:52 -06:00
Joel Dice
05f26983d0 implement more sun.misc.Unsafe methods 2011-05-26 17:41:15 -06:00
Joel Dice
24f7b42d45 ensure class initialized in {Get|Set}Static*Field
All static field accesses must trigger class initialization if it
hasn't happened already, including JNI accesses.
2011-05-26 17:39:19 -06:00
Matt Klich
7148556979 OSX Lion build changes 2011-05-26 11:57:30 -06:00
Joshua Warner
f6086e1b35 Merge branch 'master' of ssh://git.ecovate.com/avian 2011-05-23 13:37:57 -06:00
Joel Dice
7bea2b6b7d fix putstatic/putfield for 64-bit volatiles
We must call acquireMonitorForObject before popping the
putstatic/pushfield operands off the stack to avoid clobbering said
operands.
2011-05-23 12:38:12 -06:00
Joel Dice
d4da92d300 fix bugs in Deflater and DeflaterOutputStream
Previously, Deflater.deflate would pass Z_SYNC_FLUSH to zlib
unconditionally, which caused the output to be enormous when setInput
was called repeatedly with very small input buffers.  In order to
allow zlib to buffer output and thereby maximize compression, we must
use Z_NO_FLUSH until Deflater.finish is called, at which point we
switch to Z_FINISH.  We also modify DeflaterOutputStream.close to call
Deflater.finish and write any remaining output to the wrapped stream.
2011-05-16 17:12:41 -06:00
Joel Dice
e788a18bc7 implement java.util.zip.CRC32 2011-05-16 17:12:10 -06:00
Joel Dice
bfe6934183 support multiline Class-Path properties in JAR manifests 2011-05-16 10:34:10 -06:00
Joel Dice
2b229b4b6d add stub implementations of JVM_{Enable|Disable}Compiler 2011-05-16 10:33:46 -06:00
Joel Dice
18a6393ecf fix ClassCastException in ZipFile.getInputStream
This was being thrown when the parameter passed was a
JarFile.MyJarEntry, not a ZipFile.MyZipEntry, yet we cast it to the
latter.
2011-05-16 10:30:56 -06:00
Joel Dice
fa7d46c322 handle methods ending with large blocks properly when generating constant pools
We can only omit the jump past a constant pool if it's placed at the
end of a method, which is only true if the pool belongs to the last
block of that method and that block is not so large that the pool must
be placed inside the block instead of after it.
2011-05-11 19:56:29 -06:00
Joel Dice
b76cbbfa56 fix instruction offset calculation in powerpc.cpp
The previous code did not take into account any padding embedded in a
basic block due to inline jump tables, which led to invalid code
generation in large methods
2011-05-11 19:50:45 -06:00
Mike Keesey
8e736327d4 Updated powerpc build to disable stack overflow checks for now due to a problem we found with large enums. 2011-04-22 20:22:47 -06:00
Joel Dice
195bafa9b3 preserve Windows-specific OpenJDK entities from obfuscation 2011-04-14 16:39:25 -06:00
Joel Dice
a17045b02f avoid naming conflicts in OpenJDK build of libavian.a
OpenJDK's compile.c and Avian's compile.cpp were both being compiled
to compile.o, which led to a conflict when building libavian.a.  We
now append "-openjdk" to the object file name for OpenJDK code to
avoid such conflicts.
2011-04-14 16:12:12 -06:00
Joel Dice
cada2c6acc add reference to avian-swt-examples.git in readme.txt 2011-04-10 17:04:58 -06:00
Joel Dice
0987255552 tolerate missing classes in interceptFileOperations
If we fail to resolve a given class (e.g. due to ProGuard obfuscating
or eliminating it), just move on to the next one rather than return
immediately.  Otherwise, we may miss intercepting methods of classes
we can resolve.
2011-04-10 17:01:38 -06:00
Joel Dice
4d1711cd04 add OpenJDK build examples to readme.txt 2011-04-10 15:57:03 -06:00
Joel Dice
1d98d977ce only include security policy jars if they exist 2011-04-10 15:51:17 -06:00
Joel Dice
7c30e44601 add appropriate memory barriers to double-checked locking code 2011-04-10 14:46:53 -06:00
Joel Dice
88c95615c7 fix cut-and-paste error in ACQUIRE_FIELD_FOR_WRITE definition 2011-04-10 14:42:46 -06:00
Joel Dice
8091803b59 set MaxNativeCallFootprint to 5 on 32-bit systems
Thunks such as divideLong now take a pointer and two int64_t
arguments, which amounts to 5 words of stack space on a 32-bit system.
2011-04-10 12:55:42 -06:00
Joel Dice
ed8a72af9e fix MSVC build 2011-04-10 12:55:12 -06:00
Joel Dice
3febd7cea7 load libfontmanager.so before trying to resolve FontManager.initIDs
sun.font.FontManager.initIDs is a native method defined in
libfontmanager.so, yet there seems to be no mechanism in OpenJDK's
class library to actually load that library, so we lazily load it
before trying to resolve the method.
2011-04-10 11:26:44 -06:00
Joel Dice
d5fb7f97b9 implement sun.misc.Unsafe.getFloat 2011-04-10 11:26:01 -06:00
Joel Dice
f617c5c9ef Merge remote branch 'origin/localization' into oss-master 2011-04-09 21:43:44 -06:00
Joel Dice
00b829b8e8 fix Class.getDeclaredMethods
Internally, the VM augments the method tables for abstract classes
with any inherited abstract methods to make code simpler elsewhere,
but that means we can't use that table to construct the result of
Class.getDeclaredMethods since it would include methods not actually
declared in the class.  This commit ensures that we preserve and use
the original, un-augmented table for that purpose.
2011-04-09 21:20:56 -06:00
Joel Dice
1476243662 implement sun.misc.Unsafe.putShort 2011-04-09 21:20:21 -06:00
Joel Dice
6707116dd4 implement sun.misc.Unsafe.addressSize 2011-04-09 21:19:49 -06:00
Joel Dice
e1d45cf7c8 add stub implementation of JVM_GetManagement
This is the minimum needed to get Apache Geronimo running.
2011-04-09 21:18:33 -06:00
Joel Dice
b3d65fab9b fix handling of interfaces in isAssignableFrom
The old version was both incorrect (in the case where both arguments
are interfaces) and inefficient.
2011-04-09 21:09:59 -06:00
Joel Dice
948a2523f1 use vm::run to implement IsAssignableFrom and IsInstanceOf
Under certain circumstances, the implementations of these functions
may throw errors, so we need to wrap them using vm::run so we don't
try to unwind past the JNI boundary.
2011-04-09 21:07:10 -06:00
Joel Dice
239fd98781 fix compilation of unusual exception handlers
As described in commit 36aa0d6, apps such as jython which generate
bytecode dynamically can produce patterns of bytecode for which the
VM's compiler could not handle properly.  However, that commit
introduced a regression and had to be partially reverted.

It turns out the real problem was the call to Compiler::restoreState
which we made before checking whether we were actually ready to
compile the exception handler (we delay compiling an exception handler
until and unless the try/catch block it serves has been compiled so we
can calculate the stack maps properly).  That confused the compiler in
rare cases, so we now only call restoreState once we're actually ready
to compile the handler.
2011-04-09 12:44:28 -06:00
Joel Dice
c0f39fbe0c implement System.nanoTime
This is a quick and coarse, but servicable, implementation.
2011-04-08 20:32:33 -06:00
Marcel van den Boer
76fa43548d Implementation of String.replace(CharSequence, CharSequence) 2011-04-08 20:31:33 -06:00
Joel Dice
97aec1691e fix jsr/ret stack mapping regression
My last commit introduced a regression in JIT compilation of
subroutines.  This reverts the specific change which caused the
regression.  Further work will be needed to address the case which
that change was intended to fix (namely, exception handlers which
apply to multiple try/catch blocks).
2011-04-08 20:15:36 -06:00
Joel Dice
36aa0d6792 improve handling of unusual bytecode in JIT compiler
Bytecode generated by compilers other than javac or ecj (such as
jython's dynamically generated classes) can contain unreachable code
and exception handlers which apply to more than one try/catch scope.
Previously, the VM's JIT compiler did not handle either of these cases
well, hence this commit.
2011-04-08 18:50:22 -06:00
Joel Dice
60db8cc047 add some commented-out debug code to defineClass
When uncommented, this code will write each defined class to disk,
which allows one to examine e.g. dynamically-generated classes using
e.g. javap.
2011-04-08 18:46:43 -06:00
Joel Dice
d3581be38e don't abort when parsing malformed UTF8 strings
Previously, we would abort the process if we encountered a truncated
multibyte character in parseUtf8NonAscii (called by the JNI method
NewStringUTF).  Now we simply terminate the string at that point.
2011-04-07 14:39:27 -06:00
Joel Dice
af9288f4ee don't abort when parsing malformed UTF8 strings
Previously, we would abort the process if we encountered a truncated
multibyte character in parseUtf8NonAscii (called by the JNI method
NewStringUTF).  Now we simply terminate the string at that point.
2011-04-07 14:26:54 -06:00
JET
706f9d91ad Fixed bug with *nix LANG var region parsing. 2011-04-05 15:13:29 -06:00
Joel Dice
b0ae6343ad provide proper implementations of JVM_GetDeclaredClasses, JVM_GetDeclaringClass 2011-03-31 19:47:26 -06:00
Joel Dice
ef86530080 call static initializer of superclass before that of class itself
Also, assume any class which has an ancestor class which has a static
initializer needs initialization even if it doesn't have one itself,
per the Java Language Spec.
2011-03-31 19:43:49 -06:00
Joel Dice
1c7abe782d specify valid code source for system classes
This enables use of a class's protection domain to determine what JAR
or directory it came from.
2011-03-31 19:38:44 -06:00