Commit Graph

535 Commits

Author SHA1 Message Date
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
110f41b7a0 ARM makefile tweaks 2010-11-09 11:28:58 -07:00
Joel Dice
51ba49def6 enable ARM cross builds 2010-11-08 20:48:08 -07:00
Joel Dice
8ca5e9780e fix OS X build 2010-11-07 21:23:25 -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
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
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
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
JET
45e6cd5a60 The localization properties are now functional. Only 16 languages are currently reported on Windows. 2010-10-05 17:53:17 -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
20990950bb build everything (including classes) in options-specific directory
Previously, we only built platform specific code in an
options-specific directory (e.g. build/linux-x86_64-debug), but built
the Java classes in the shared, top-level build directory.  This
minimized duplication when building with different sets of options,
but now that we're supporting the option of selecting a third-party
class library, we need to put the classes in the options-specific
directory as well.
2010-09-17 16:03:37 -06:00
Joel Dice
d0d53e2e10 fix custom-classloader-related concurrency problems and other bugs
The main changes in this commit ensure that we don't hold the global
class lock when doing class resolution using application-defined
classloaders.  Such classloaders may do their own locking (in fact,
it's almost certain), making deadlock likely when mixed with VM-level
locking in various orders.

Other changes include a fix to avoid overflow when waiting for
extremely long intervals and a GC root stack mapping bug.
2010-09-16 20:49:02 -06:00
Joel Dice
f485016637 implement more JVM_* methods and avoid duplicate array class loading 2010-09-14 18:52:57 -06:00
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
b62d07996f avoid including path name of libjvm.so in avian-dynamic 2010-09-10 17:44:53 -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
Matt Klich
686f1ba983 Revert "win32 i386 build should use mingw64 if available"
This reverts commit 74e282a3d3.
2010-06-09 16:03:48 -06:00
Matt Klich
74e282a3d3 win32 i386 build should use mingw64 if available 2010-05-17 12:36:39 -06:00
Matt Klich
62c741d969 Specify -m flag on windows x86_64 gcc/g++ compilers. 2010-05-13 17:01:55 -06:00
JET
3aac50555b fixed ARM interpreted-mode regression 2010-04-20 15:51:35 -06:00
Joel Dice
e5fad03632 fix MSVC build rot 2010-04-15 11:11:10 -06:00
Hudson Build Application account
48cc14f8ed fixed linux build because darwin fix broke it 2010-02-05 17:15:12 -07:00
Matt Klich
d4cae8f15e Fixed darwin build. 2010-02-05 16:40:48 -07:00
Matt Klich
9d5e0bb154 Updated to always specify bitness of target. cc and cxx will always have -m32 or -m64 appended based on the arch that is being built. 2010-02-04 11:15:16 -07:00
Joel Dice
67cdac3a36 tweak MSVC compiler flags
We now use -O2 for the "fast" build and always pass -debug to the linker so we get a PDB file.
2009-12-14 08:43:07 -07:00
Joel Dice
2b4361c060 fix GNU Classpath build 2009-12-05 19:40:46 -07:00
Joel Dice
028fd42f5e detect and prohibit unsupported bootimage cross-builds in makefile 2009-12-03 10:47:50 -07:00
Joel Dice
2bb5ccebd3 update version number 2009-12-02 19:09:28 -07:00
Eric Scharff
398f861768 Support 64-bit Mac builds 2009-12-01 14:24:33 -07:00
Joel Dice
f75868b394 don't specify -march=i486 on Darwin because a later generation is assumed by default 2009-11-20 11:40:55 -07:00
Joel Dice
15eada93ed implement atomicCompareAndSwap on x86_32 for GCC versions prior to 4.1 and for MSVC 2009-11-20 10:40:01 -07:00
Joel Dice
07f40a07e1 specify -march=i486 for x86_32 to support __sync_bool_compare_and_swap 2009-11-19 18:51:43 -07:00
Joel Dice
ef9c1ee32c specify -arch explicitly to compiler and liner on OS X
On 10.6 the compiler generates x86_64 code by default, even though uname -m reports "i386", so we have to be explicit
2009-11-03 16:07:13 -07:00
Joel Dice
e825da60aa update continuation constants to reflect new field offsets 2009-10-30 00:45:46 +00:00
jet
d901653979 Merge branch 'master' into wip
Conflicts:

	src/compile.cpp
2009-10-29 14:23:20 -06:00
jet
e00fc5d91a ARM port work 2009-10-29 10:12:30 -06:00
Joel Dice
a0952b89ed use new x86_64-w64 tool prefix for 64-bit Windows build 2009-10-20 13:39:09 -06:00
Joel Dice
cec6444911 fix bootimage build for case where the JIT code area is too far from the AOT code area to do immediate-offset jumps between them 2009-10-17 18:18:03 -06:00
Joel Dice
7b0378c180 support darwin/x86_64 2009-10-14 10:01:37 -06:00
Joel Dice
0ae02511c6 remove unused definition from makefile 2009-10-13 19:40:39 -06:00
Joel Dice
c3824b0108 specify segment __RWX in bootimage-lflags on Darwin to match new name used in binaryToObject 2009-10-13 19:14:03 -06:00
Joel Dice
ef4a8430ad add binaryToObject utility
We use this utility instead of objcopy to embed data into object files
because it offers more control over e.g. section alignment, which is
important for bootimage builds.
2009-10-13 19:00:16 -06:00
Joel Dice
9fcdfaf7ff implement binaryToElf utility and use it instead of objcopy on Linux
This is necessary because objcopy does not currently allow us to
specify the alignment requirement for the .boot section used to store
the boot image for AOT builds.  This may be a problem for Windows as
well, in which case we'll need to add a binaryToPE utility.
2009-10-11 16:09:23 -06:00
jet
bf84d91bad Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-09-17 14:07:16 -06:00
Joel Dice
a2a33c259e fix test class build when boot classes change 2009-09-17 11:50:35 -06:00
jet
7733433483 Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-09-14 14:30:33 -06:00
Joel Dice
49d113f43f fix parallel bootimage build 2009-09-05 18:40:37 -06:00
Joel Dice
44ae6a02c2 fix parallel (make -jN) build 2009-09-05 16:04:43 -06:00
Joel Dice
8956b98604 speed up build (especially on Windows) by avoiding redundant shell command execution in makefile 2009-09-05 15:21:45 -06:00
jet
68355b17cd Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-09-03 14:12:44 -06:00
Joel Dice
9550eca866 uncomment MAKEFLAGS definition in makefile 2009-09-01 12:15:19 -06:00
jet
abd4f6aeef Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-09-01 09:05:54 -06:00
Joel Dice
9c52fb434c add manifest to executables and DLLs when building with MSVC 2009-09-01 08:42:33 -06:00
jet
ae377e8fc6 Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-08-27 15:32:11 -06:00
Joel Dice
4df81911fe fix OSX build regression 2009-08-27 09:30:34 -06:00
Joel Dice
ca271e5ab9 specify name of pdb file when compiling with MSVC 2009-08-26 18:38:47 -06:00
Joel Dice
1a0eef7e2d add support for building with MSVC on Windows 2009-08-26 18:26:44 -06:00
Joel Dice
3b30dccaac strip binaries if and only if optimizing 2009-08-24 16:38:00 -06:00
jet
1528a9dddf Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-08-18 15:17:34 -06:00
jet
bf75e73aa9 Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-08-13 09:57:40 -06:00
Joel Dice
d983e8883c use our version of SoftReference when using GNU Classpath 2009-08-13 09:18:01 -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
jet
0be90bc769 added ARM modifications to makefile 2009-08-06 13:25:20 -06:00
Joel Dice
3e0c0c8116 revert recent accidental makefile changes 2009-08-06 12:10:44 -06:00
jet
1ffe46a545 added ARM interpreted mode supported 2009-08-06 11:52:36 -06:00
Joel Dice
b6e49d8a4c refine gnu-overrides definition in makefile 2009-08-04 18:31:33 -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
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
jent
8335dc4297 Now using the CoreServices instead of the Carbon framework....this
allows for cocoa and future compatability
2009-07-02 03:30:05 -06:00
jent
3367ac88e3 Added in code to support os.version for Windows/Linux/OSX
The make file had to be modified to include the carbon framework in OSX
2009-07-01 09:13:01 -06:00
Josh warner
a80d30b4ce added windows-x86_64 build target 2009-06-11 09:36:53 -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
402fef9ae8 include native Classpath code in dynamic library
Note that this requires building Classpath with -fPIC on platforms where
it is not the default.
2009-06-06 14:25:05 -06:00
Joel Dice
6efeee49f8 include native Classpath code in libavian.a and the avian executable 2009-06-06 14:18:33 -06:00
Joel Dice
c14ae4d2f7 fix rebuild when using GNU Classpath 2009-06-04 17:54: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
0f6dbe35a7 add build option for using GNU Classpath 2009-06-02 18:55:49 -06:00
Joel Dice
a4d4db8eb4 fix cygwin/msys bootimage build 2009-06-01 12:12:29 -06:00
Joel Dice
b5cb1692fb document avian.Continuations 2009-05-29 18:32:16 -06:00
Joel Dice
ca4e62cdb7 pass -DAVIAN_CONTINUATIONS to assembler when continuations enabled 2009-05-28 18:51:53 -06:00
Joel Dice
4eeabbeec3 point javac to the right output directory when building extra tests 2009-05-25 23:27:47 -06:00
Joel Dice
31eb75a736 support tail calls and continuations as build options 2009-05-25 23:27:10 -06:00
Joel Dice
e35047b056 build but don't run extra tests in makefile 2009-05-18 09:17:09 -06:00
Joel Dice
6dc6f01359 move extra tests (not run as part of "make test") into "extra" package 2009-05-16 02:01:32 -06:00
Joel Dice
d11195165f add tarball target to makefile 2009-04-11 11:54:43 -06:00
Joel Dice
7311fdab02 fix bootimage build 2009-03-15 13:47:07 -06:00
Joel Dice
c485613e26 update version to 0.2 in makefile 2009-03-15 12:01:56 -06:00
Joel Dice
9abc25e134 refine build directory naming system to avoid needing to 'make clean' upon changing build parameters 2009-03-14 15:16:05 -06:00
Joel Dice
6c271ac994 fix powerpc bootimage build 2009-03-09 18:52:09 -06:00
Joel Dice
661b49ea92 Merge branch 'master' into powerpc 2009-03-07 16:41:17 -07:00
Joel Dice
abe6ada0c2 Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-03-07 16:40:56 -07:00
Joel Dice
ea4764c924 Merge branch 'master' into powerpc 2009-03-07 16:40:23 -07:00
Joel Dice
8c1c861a58 search ../win32/include before $JAVA_HOME/include for windows builds, since we don't want to accidentally use the jni_md.h for the host system 2009-02-22 17:04:14 -07:00
Joel Dice
ba4e2a6582 rename compile.S to compile-x86.S and add compile-powerpc.S 2009-02-16 08:21:12 -07:00
Joel Dice
de6388a719 fix powerpc/interpret build 2009-02-15 12:51:39 -07:00
Joel Dice
bec13838c1 Merge branch 'powerpc' of oss.readytalk.com:/var/local/git/avian 2009-02-15 12:34:01 -07:00
Joel Dice
71ccac1ef7 default to specified build mode when building the bootimage generator instead of hard-coding it to 'fast' 2009-02-14 13:25:07 -07:00
U-JOELDICEXPVM\Joel Dice
ec5c64d472 fix Cygwin build 2009-02-13 17:03:46 -07:00
Joel Dice
9b0d6854ec fix merge conflicts 2009-02-09 16:22:51 -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
368c804bb7 bootimage-object should depend on binaryToMacho 2008-12-18 20:10:25 -07:00
Joel Dice
2622773eb4 support bootimage build on OS X 2008-12-18 19:52:03 -07:00
Joel Dice
c479bccdb4 support cross-platform bootimage build (as long as the build arch matches the target arch 2008-12-04 17:24:38 -07:00
Joel Dice
7d68c9b0a5 Merge branch 'bootimage' of oss.readytalk.com:/var/local/git/avian
Conflicts:

	src/heapdump.cpp
2008-12-04 14:29:17 -07:00
Rich Scott
db3434001f Use mingw32 'strip' when compiling for Windows.
This fixes the error when using /usr/bin/strip on
Ubuntu 8.10 when it believes the target file is of
an "ambiguous format".
2008-12-03 13:12:49 -07:00
Joel Dice
4ec853d1bc include heapwalk.o in libavian.a if bootimage=true 2008-12-02 19:37:16 -07:00
Joel Dice
4a1dd3a8f7 specify writable and executable section for boot image 2008-12-01 19:35:52 -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
61ecb56e21 Merge branch 'master' of oss:/var/local/git/avian into powerpc 2008-11-25 16:19:21 -07:00
Joel Dice
6500f1eff6 initial work to support boot image creation and use 2008-11-21 16:20:35 -07:00
Joel Dice
15ea90cd0c specify -fno-omit-frame-pointer to ease debugging and profiling 2008-11-19 18:10:29 -07:00
Joel Dice
4dd1d1eec8 add Subroutine test to cover jsr and ret instructions 2008-11-12 10:07:30 -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
6f1d02dae7 remove the libstdc++ dependency once and for all
The trick is to make all destructors non-virtual.  This is safe because
we never use the delete operator, which is the only case where virtual
destructors are relevant.  This is a better solution than implementing
our own delete operator, because we want libraries loaded at runtime to
use the libstdc++ version, not ours.
2008-10-28 15:40:50 -06:00
Joel Dice
708d2f1c0c compile assembly files using different flags than C++ files
This is intended to fix the build error described here:

  http://groups.google.com/group/avian/msg/38b6619d6d8cac68
2008-10-23 16:55:39 -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
f38a55cbb2 make linking against libstdc++ the default, overrideable via use-libstdcpp make parameter 2008-10-13 16:31:59 -06:00
dain
8549ab856e Merge branch 'master' of ssh://oss.readytalk.com/var/local/git/avian 2008-10-13 09:48:04 -06:00
dain
157b1facf8 Add stdc++ to common-lflags 2008-10-13 09:46:07 -06:00
Joel Dice
1a39012002 support building on Cygwin 2008-10-11 14:46:20 -06:00
Joel Dice
54e618847a use /bin/sh instead of /bin/bash to run test.sh, since MSYS does not have /bin/bash (although /bin/sh is bash) 2008-10-11 11:59:18 -06:00
Frank Jacobs
471ac4d960 support building from a directory with spaces in its name 2008-10-11 10:10:11 -06:00
Joel Dice
5c04c19e29 look for %s@%d format symbols when resolving native methods on Windows, which obviates the need for -k flag to dlltool 2008-10-10 17:37:36 -06:00
Joel Dice
e3a5c7e03f look for jar under $JAVA_HOME/bin 2008-10-10 17:01:33 -06:00
Joel Dice
e2c04b2761 various makefile refinements for better supporting native Windows builds 2008-10-10 11:43:40 -06:00
Frank Jacobs
68513521ef support building on Windows using MinGW
Here is a patch for getting Avian to build in Windows. I used MinGW
and MSYS for the build environment. The patch has the following
changes:

1. java-nio.cpp: Had to add an include and remove a function
declaration that was reported as duplicate.
2. readme.txt: Updated the instructions to include notes about
building on Windows.
3. makefile: Added a conditional for MinGW. I left the existing "ifeq
($(platform),windows)" conditional alone so as to not break
cross-compiled Windows builds. There are some similarities between the
two, so it might be possible to combine portions of them in an elegant
manner. Since I'm not sure how the cross-compiled builds have been
done, I didn't want to mess with that portion of the makefile.
2008-10-10 08:06:31 -06:00
Joel Dice
e2f0b45337 add 'small' optimization mode 2008-09-29 11:13:31 -06:00
Joel Dice
65f9f3583c uncomment MAKEFLAGS = -s 2008-06-25 17:17:04 -06:00
Joel Dice
a85cf0115d fix makefile for building on linux
This may break OS X PowerPC, but I don't have such a machine to test on
at the moment.
2008-06-24 14:58:58 -06:00
Joel Dice
8512d6c74c Merge branch 'master' of oss:/var/local/git/avian into powerpc 2008-06-23 17:38:16 -06:00
Joel Dice
2716169110 update version number to 0.1.1 2008-06-17 17:30:00 -06:00
dicej
a9ae50900a define LinkageArea in powerpc.h and add the latter to makefile 2008-06-15 12:48:53 -06:00
dicej
358f3f801b Merge branch 'master' of oss.ecovate.com:/var/local/git/avian into powerpc 2008-06-15 11:48:05 -06:00
Joel Dice
064ba4519a update version number to 0.1 2008-06-08 15:51:11 -06:00
dicej
f375f6e85c enable powerpc build for process=interpret (won't run yet, though) 2008-06-04 17:09:09 -06:00
dicej
0ccf8d57ea rough sketch of powerpc support 2008-06-04 16:21:27 -06:00
Joel Dice
f3fb813714 update valgrind.supp to suppress ld-2.6.so warnings 2008-05-18 22:24:12 -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
Dain
3fcfae5c66 removed --kill-at flag 2008-04-09 17:15:28 -06:00
Joel Dice
74295bb707 interpret avian.bootstrap property as a complete file name 2008-03-31 12:57:49 -06:00
Joel Dice
c37f0dcf18 fix darwin build 2008-03-30 22:23:51 -06:00
Joel Dice
357bd29460 support building Avian as a self-contained dynamic library 2008-03-30 21:43:43 -06:00
Joel Dice
55d2fb8f57 specify doctitle, etc. when generating javadoc 2008-03-11 12:51:07 -06:00
Joel Dice
a388ca19ee fix build for GCC 4.3
Note that this requires removing the -Wconversion flag for now.  I'll
see about restoring it when I'm ready to tackle all those warnings.
2008-03-10 13:49:10 -06:00
Joel Dice
b7f2f95c39 uncomment MAKEFLAGS = -s 2008-03-09 15:28:23 -06:00
Joel Dice
7cfb89bd2a Merge branch 'master' into compiler 2008-03-09 11:31:55 -06:00
Joel Dice
315fc06a20 look for win32 headers and libraries in parent directory 2008-03-07 16:34:24 -07:00
Joel Dice
fbc5463fb1 specify Avian version via a macro defined in makefile 2008-03-06 13:30:26 -07:00
Joel Dice
9d76d6a04e implement a few more classpath methods, including Collection.addAll and Collection.toArray 2008-02-28 11:37:10 -07:00
Joel Dice
3317149cd2 Merge branch 'master' into compiler
Conflicts:

	src/x86.cpp
2008-02-26 17:56:35 -07:00
Joel Dice
b2e7099bbc add javadoc target to makefile 2008-02-26 17:19: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
b9fa7179d9 more work on new compiler; addition now works 2008-02-11 17:20:32 -07:00
Joel Dice
5b2f351f01 adapt compile.cpp to new compiler 2008-02-11 10:21:41 -07:00
Eric Scharff
c1f3d28d24 Fixes dynamic symbol loading bug on Mac OS X.
On OS X, when you call dlopen() on a null library, and then call dlsym(),
the most recently loaded symbols are always used, no matter what flags
we seem to pass to dlopen().  The solution is to explicitly find the name
of the running executable, and open that as a library.
2008-01-28 16:17:22 -07:00
Joel Dice
008ac07079 refactor native method resolution to be simpler and more robust 2008-01-28 10:27:02 -07:00
Joel Dice
aa081089ce use compile-object to build jni-objects 2008-01-25 16:45:52 -07:00
Joel Dice
6bca3a8665 additional tweaks to make embedded resources work on darwin 2008-01-23 10:12:56 -07:00
Joel Dice
618684de6e support embedded resources on darwin via binaryToMacho.cpp 2008-01-23 09:56:25 -07:00
Joel Dice
c3ce201a59 revert earlier change of breaking libclasspath.a out of libvm.a 2008-01-21 16:58:27 -07:00
Joel Dice
d3774d54bc build libclasspath.a, which contains native methods for the classpath 2008-01-21 16:51:23 -07:00
Joel Dice
f29b1b9b6f libvm.a should not include classpath code 2008-01-21 16:42:44 -07:00
Joel Dice
35160e46d8 don't include embedded boot classpath in libvm.a, only the executable 2008-01-18 17:54:36 -07:00
Joel Dice
e6aea41a88 make the default compilation mode 'fast' 2008-01-11 17:35:27 -07:00
Joel Dice
48e532f8e9 add debug-fast compilation mode 2008-01-11 17:15:34 -07:00
Joel Dice
8e5ce11047 refactor memory management code
We now support immortal objects, which the GC will scan for references
but not consider for collection.  On x86_64, we allocate JIT code memory
via mmap, which lets us map memory into the bottom 2GB of the address
space, ensuring that 32-bit relative jumps and calls work.
2008-01-09 18:20:36 -07:00
Joel Dice
324744d525 makefile cleanups 2008-01-08 15:05:56 -07:00
Joel Dice
6057ffd693 whitespace tweak 2008-01-03 19:17:42 -07:00
Joel Dice
e81a534986 misc makefile tweaks 2008-01-03 12:49:42 -07:00
Joel Dice
f151d85f4e intercept SIGSEGV and throw NullPointerExceptions 2007-12-31 15:40:56 -07:00
Joel Dice
5d65e7c220 handle synchronized methods properly in JIT mode 2007-12-27 17:02:05 -07:00
Joel Dice
a2181e88c0 include boot classpath in vm arguments on darwin, since we don't build those classes into the executable 2007-12-27 08:46:17 -07:00
Joel Dice
6ed28a13c3 fix x86-32 regressions due to JIT refactoring 2007-12-26 10:16:21 -07:00
Joel Dice
b361e1b637 refactor JIT code to make operand size an explicit part of each applicable instruction 2007-12-26 09:56:14 -07:00
Joel Dice
8cd18d6193 more JIT bugfixes 2007-12-23 13:06:24 -07:00
Joel Dice
f87a78833b fix JIT regressions on amd64 2007-12-23 12:18:34 -07:00
Joel Dice
15857135c0 more JIT fixes; all tests now pass on x86-32 2007-12-23 11:48:22 -07:00
Joel Dice
a020a3f6bb handle various return types properly in invokeNative2 2007-12-23 11:09:41 -07:00
Joel Dice
31cf1754ce fix frame trace bug leading to incomplete stack coverage during GC; fix thinko pushing arguments in vmInvoke 2007-12-23 11:01:41 -07:00
Joel Dice
6c532e2ba4 fix register allocation bugs in floating point instructions 2007-12-22 17:15:46 -07:00
Joel Dice
be42c325d8 32-bit JIT bugfixes; still broken 2007-12-19 18:42:12 -07:00
Joel Dice
7dd81c803a fix native call argument marshalling regression 2007-12-19 17:02:32 -07:00
Joel Dice
4c3a2575ba lots of JIT bugfixes; all top-level tests now pass 2007-12-17 13:55:31 -07:00
Joel Dice
56a8ce8fb1 more JIT bugfixes; implement mul instruction 2007-12-16 16:52:38 -07:00
Joel Dice
e4fbadd051 JIT-related GC safety fixes 2007-12-16 15:41:07 -07:00
Joel Dice
86218ebcb8 fix stack pointer calculation in unwind code and set rbx to thread pointer when unwinding 2007-12-15 18:00:25 -07:00
Joel Dice
796a64a426 lots of JIT bugfixes and cleanups 2007-12-15 17:24:15 -07:00
Joel Dice
fdeafe46fd 2+2 test now works with new JIT code 2007-12-11 14:26:59 -07:00
Joel Dice
f8cda0cd85 more JIT compiler progress 2007-12-09 15:45:43 -07:00
Joel Dice
466c958d2b implement persistent red-black tree in util.cpp based on PersistentSet.java 2007-11-26 18:40:47 -07:00
Joel Dice
0bbe9489a7 flesh out call tracing in new JIT code 2007-11-26 16:15:53 -07:00
Joel Dice
49ed41daa0 refactor stack walking interface in processor.h and sketch stack walking implementation in compile2.cpp 2007-11-25 16:00:55 -07:00
Joel Dice
3570beaba9 specify -DNDEBUG cflag in debug mode to improve performance when debugging large apps 2007-11-14 16:23:15 -07:00
Joel Dice
fe0e542afe finish support for inline vtables in class objects; convert constant pools from arrays to singletons to reduce memory footprint 2007-11-05 14:40:17 -07:00
Joel Dice
19d36cc463 implement impdep1 instruction for lazily loading bootstrap classes 2007-11-05 08:29:43 -07:00
Joel Dice
6c0e0c37e2 snapshot 2007-11-05 07:28:46 -07:00
Joel Dice
514be2dc87 snapshot 2007-11-04 16:10:33 -07:00
Joel Dice
94e9bd0fd2 clean up bootstrap type generation to eliminate redundancy (broken) 2007-11-04 14:15:28 -07:00
Joel Dice
bea4a73f54 Merge branch 'singleton' 2007-11-02 15:56:48 -06:00
Joel Dice
7dfbd87a40 bugfixes 2007-11-02 15:42:19 -06:00
Joel Dice
e820b6a8a4 sketch of singleton support 2007-11-02 15:08:14 -06:00
Joel Dice
d3592f2dbd tweak makefile to recompile all dirty java files in a single javac invocation for efficiency 2007-11-02 08:01:10 -06:00
Eric Scharff
eb3bd1ce7c Got strip working for Mac OS X 2007-11-01 14:37:51 -06:00
Eric Scharff
7f33b7371b Factored JNIEXPORT into one place. Adopted the visbility attribute that
should allow strip to work on Mac OS X
2007-11-01 14:00:22 -06:00
Eric Scharff
b3891debb2 Fixes build for Mac OS X.
If the binary is stripped on Mac OS X, dlsym fails, so builtin native library
calls do not work.  The solution, in this case, is to not strip the binary.
2007-10-30 16:22:53 -06:00
Joel Dice
956106f518 implement StringBuilder.delete() more efficiently 2007-10-29 15:40:05 -06:00
Joel Dice
7aecdb6ce0 undo accidentally-committed makefile change 2007-10-28 18:54:21 -06:00
Joel Dice
a80677d673 fix aliasing warnings 2007-10-28 18:51:38 -06:00
Joel Dice
7f1837fecd move fixed object (mark and sweep) support into heap.cpp and refine algorithms for determining when and how much to GC 2007-10-28 13:14:53 -06:00
Joel Dice
60072b9fdc implement fixed object support 2007-10-27 19:54:30 -06:00
Eric Scharff
8f604ca7e1 makefile cleanups 2007-10-26 16:16:47 -06:00
Eric Scharff
789cc8e9a2 On the Mac, building in the vm object is complicated. Instead,
rely on external files.
2007-10-26 16:10:12 -06:00
Joel Dice
476a0d70f2 Merge branch 'master' of dice:git/vm
Conflicts:

	makefile
2007-10-26 15:03:53 -06:00
Joel Dice
f354abb4a0 build fixes and refactoring 2007-10-26 15:02:39 -06:00
Eric Scharff
e2ae3201f7 Fix for mac's lacking objcopy - rely on the version in MacPorts 2007-10-26 13:43:14 -06:00
Eric Scharff
4088387cf0 Fix typo in makefile - path must be specified to find 2007-10-26 13:32:19 -06:00
Joel Dice
ccdc7fdda3 eliminate bin2c and use objcopy instead to translate binary data to an object file 2007-10-26 11:38:36 -06:00
Joel Dice
d0089c4d88 makefile fixes 2007-10-26 08:34:54 -06:00
Joel Dice
448d48adc9 superficial makefile tweak 2007-10-25 18:03:26 -06:00
Joel Dice
20cc788fa4 support classloading from jar files compiled into the executable 2007-10-25 16:06:05 -06:00
Joel Dice
b12b779c7f add support for passing properties to the VM via JNI; use vm.builtins property to specify builtin libraries 2007-10-25 12:33:43 -06:00
Joel Dice
2de0decfe3 Merge branch 'master' of dice:git/vm
Conflicts:

	src/interpret.cpp
2007-10-25 09:05:24 -06:00
Joel Dice
1c90ea5fd6 rewrite main.cpp to use jni.h interface for creating the VM and invoking the main method of the specified class 2007-10-25 09:04:13 -06:00
Eric Scharff
b91307224d Fixed broken mac commit 2007-10-25 09:03:24 -06:00
Eric Scharff
5131cac38a Fix regression for non Mac OS X platforms linking in archives 2007-10-25 08:58:44 -06:00
Eric Scharff
782f7e8feb Fixes build parameters for Mac 2007-10-25 08:55:48 -06:00
Joel Dice
eaf1d205cd more windows port fixes 2007-10-24 11:24:19 -06:00
Joel Dice
75b79e133e use /usr/local/win32 include and lib directories in makefile when cross-compiling for windows 2007-10-24 09:46:44 -06:00
Joel Dice
4dfcaa0f91 build standalone executable (no seperate .so) on all platforms; build libvm.a too 2007-10-23 17:23:55 -06:00
Joel Dice
c686d1ca60 add -k to dlltool command 2007-10-23 14:18:42 -06:00
Joel Dice
eb4cea6291 more work on the windows port; we now have some tests passing 2007-10-23 14:05:59 -06:00
Joel Dice
1381267e70 mork work on the windows port 2007-10-23 11:22:48 -06:00
Joel Dice
58dec050c8 sketch of windows port 2007-10-22 19:00:57 -06:00
Joel Dice
ac4b28ffe6 refactor build system to support cross-compiling 2007-10-22 14:56:27 -06:00
Joel Dice
5fb1495f4d bugfixes and new instructions in compile.cpp 2007-10-16 19:21:35 -06:00
Joel Dice
96ed27c55c various bugfixes to get Tree.java to work 2007-10-16 11:21:26 -06:00
Joel Dice
5f6258045e implement various floating point instructions; fix Floats.java to actually test something 2007-10-15 13:12:38 -06:00
Joel Dice
5c99edd90e fix many JIT GC bugs; GC.java now passes 2007-10-13 15:48:40 -06:00
Joel Dice
7e0731ebdd various bugfixes involving longs 2007-10-08 17:13:55 -06:00
Eric Scharff
673aec28fb The warning -Wold-style-cast turns out to be more trouble than its worth
when dealing with old-style casts that are in header files.  Removing.
2007-10-08 13:29:40 -06:00
Joel Dice
404d996c1e snapshot 2007-10-03 18:41:54 -06:00
Joel Dice
68e382ca8d snapshot 2007-10-01 18:08:17 -06:00
Joel Dice
7ecb5b9c30 fixes for various recent regressions 2007-09-30 10:32:17 -06:00