Commit Graph

2214 Commits

Author SHA1 Message Date
Joel Dice
86188cfc04 fix OS X openjdk and openjdk-src builds 2010-11-15 20:28:53 -07:00
Joel Dice
02bdec6f8c fix Cygwin/MSYS openjdk-src builds 2010-11-15 16:27:00 -07:00
Joel Dice
46be43a0e3 fix MSYS OpenJDK build 2010-11-12 19:04:17 -07:00
Joel Dice
0ca6c3ed53 fix native Windows GCC 3.4 OpenJDK build 2010-11-12 18:29:12 -07:00
Joel Dice
26a59612bb fix native Windows GCC 3.4 build 2010-11-12 16:53:16 -07:00
Joel Dice
8ca5e9780e fix OS X build 2010-11-07 21:23:25 -07:00
Joel Dice
580e7e1b3f remove @Overload annotation since Java 1.5.0_19 chokes on it 2010-11-07 12:57:42 -07:00
Joel Dice
75de0a621b fix windows.cpp MySystem::now 2010-11-07 12:35:31 -07:00
Joel Dice
6cf3666ed9 fix timezone lookup for Windows openjdk-src build 2010-11-07 12:24:40 -07:00
Joel Dice
33b945c10b fix Windows openjdk (non-openjdk-src) build 2010-11-07 10:08:04 -07:00
Joel Dice
e1b808024a initial support for Windows OpenJDK build
All the tests are passing for openjdk-src builds, but the non-src
openjdk build is crashing and there's trouble loading time zone info
from the embedded java.home directory.
2010-11-06 22:21:19 -06:00
Joel Dice
df299f3564 fix build against latest JRE 1.6.0_22
This commit accomodates a new field in java.lang.Thread and implements
JVM_FindClassFromBootLoader.
2010-11-05 15:34:28 -06: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
4cb796d2fb only return null from JVM_GetClassLoader when called from Unsafe.getUnsafe
sun.misc.Unsafe.getUnsafe expects a null result if the class loader is
the boot classloader and will throw a SecurityException otherwise
(whereas it should really be checking both for null and comparing
against the system classloader).  However, just returning null
whenever the loader is the boot loader can cause trouble for embedded
apps which put everything in the boot loader, including application
resources.

Therefore, we only return null if it's the boot loader and we're being
called from Unsafe.getUnsafe.
2010-11-04 11:43:50 -06:00
Joel Dice
cabad6926f enable standalone OpenJDK builds
As described in readme.txt, a standalone OpenJDK build embeds all
libraries, classes, and other files needed at runtime in the resulting
binary, eliminating dependencies on external resources.
2010-11-04 11:02:09 -06:00
Joel Dice
cb69ac23bd Merge remote branch 'origin/master' into openjdk
Conflicts:
	classpath/java/lang/String.java
	src/posix.cpp
2010-11-03 11:54:41 -06:00
Joel Dice
5ade8d1cf6 use GetSystemTimeAsFileTime instead of _ftime on Windows
It seems that _ftime has devolved to only giving 1-second resolution
on Windows 7.  GetSystemTimeAsFileTime does better, so that's what
we'll use.
2010-10-28 20:30:49 -06:00
Joel Dice
21deedc500 update openjdk.pro 2010-10-24 14:50:33 -06:00
Joel Dice
cdcc9caeb2 initial work towards ProGuard-enabled OpenJDK builds 2010-10-24 11:52:14 -06:00
Joel Dice
25ca40931d keep track of original class in resolveField so we can throw an exception with a useful message 2010-10-24 11:49:59 -06:00
Joel Dice
6f839323a7 use user-specified boot classpath exclusively when present 2010-10-24 11:49:12 -06:00
Joel Dice
ec6080fea6 update readme.txt to point to new classpath.jar path 2010-10-24 11:45:41 -06:00
Joel Dice
9c603c6525 fix member offset calculation inconsistencies in type-generator.cpp 2010-10-23 20:41:45 -06:00
Joel Dice
6df0b2cfd9 look for 32-bit JRE libraries under lib/i386 2010-10-23 20:40:48 -06:00
Joel Dice
05ff032f69 pass -march=i586 to gcc when targetting 32-bit x86
Recent versions of GCC will only give us
__sync_bool_compare_and_swap_8 if we target i586 and above,
apparently.
2010-10-23 20:38:42 -06:00
Joel Dice
1ed03b9096 fix build breakage due to makefile syntax confusion
Consider the following makefile construct:

target: dep0
target: dep1 dep2
  command -o $(@) $(^)

With some versions of make, $(^) will expand to "dep1 dep2", but on
others it will expand to "dep0 dep1 dep2".  The commit ensures that we
no longer rely on the former behavior (nor the latter, for that matter).
2010-10-22 18:20:19 -06:00
Joel Dice
5cbfee467c fix Runtime.exec on Posix
Due to a silly cut-and-paste error, we were incorrectly passing the
stdout and stderr file descriptors back from native code to Java,
which prevented reading the output of the child process.
2010-10-22 14:39:38 -06:00
Joel Dice
cf14a2c222 add exception for Object.clone() to vm.pro
Proguard gets confused about clone() and array classes (see
http://sourceforge.net/tracker/index.php?func=detail&aid=2851344&group_id=54750&atid=474704).
2010-10-15 23:06:03 +00:00
Joel Dice
081d2d68ce handle and ignore SIGPIPE on Posix systems
We must handle this signal or we'll get the default behavior of
exiting the process whenever we get an unexpected network
disconnection.
2010-10-14 23:43:35 +00:00
Joel Dice
b3accf1b30 ServerSocketChannel throws IOException, not Exception 2010-10-13 13:38:31 -06:00
Joel Dice
ca251dfa17 print error message on failed dlopen if Verbose is true in posix.cpp 2010-10-13 13:37:09 -06:00
Joel Dice
1f67aea456 fix process=interpret build 2010-09-27 17:12:08 -06:00
Joel Dice
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
Joel Dice
8c789fb92c return empty object array from MyProcessor::getStackTrace on failure 2010-09-27 09:39:44 -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
268d2de175 cache array class lookups in element class; misc. bugfixes 2010-09-25 15:54:01 -06:00
Joel Dice
a2cc95d196 remove trailing whitespace in compile.cpp 2010-09-25 15:52:43 -06:00
Joel Dice
c939d16687 formatting tweak in Classes.java 2010-09-25 15:51:30 -06:00
Joel Dice
e75b57a127 don't abort when compiling an array lookup with a constant negative index
Instead, just compile it as a direct call to the thunk which throws an
ArrayIndexOutOfBoundsException.
2010-09-25 15:48:15 -06:00
Joel Dice
ebc54c234f fix signedness error for wide iinc implementation 2010-09-23 08:50:09 -06:00
Joel Dice
b023d147df fix JVM_Available for when fd is a fifo or socket 2010-09-23 08:49:36 -06:00
Joel Dice
89f6adc93c fix various classloading deadlocks and races 2010-09-22 13:58:46 -06:00
Joel Dice
efd3ccb04f set java.home to path of JRE, not JDK 2010-09-20 18:38:38 -06:00
Joel Dice
17f495eb27 rework OpenJDK build to derive classpath and library path from environment
We now consult the JAVA_HOME environment variable to determine where
to find the system library JARs and SOs.  Ultimately, we'll want to
support self-contained build, but this allows Avian to behave like a
conventional libjvm.so.
2010-09-20 17:31:23 -06:00
Joel Dice
88942a9672 search for jar file in Zip.java instead of trying to load by hard-coded name 2010-09-20 17:30:39 -06:00
Joel Dice
0456a9fd49 define user.dir property in Java_java_lang_System_getProperty 2010-09-20 17:28:42 -06:00
Joel Dice
64e42da348 implement avian.Handler.ResourceInputStream.available 2010-09-17 16:11:04 -06:00
Joel Dice
93c9395f1d comment-out debug logging 2010-09-17 16:10:26 -06:00
Joel Dice
a0a23b4692 implement JVM_Yield 2010-09-17 16:10:01 -06:00
Joel Dice
7fffba29e6 Keep reading in BufferedInputStream.read until in.available() <= 0
This corresponds to the documented behavior of OpenJDK's version.
2010-09-17 16:08:42 -06:00