Joshua Warner
3d1ae1d517
fix include-what-you-use violations in x86 assembler
2013-02-23 22:29:58 -07:00
Joshua Warner
900b447e27
further break out powerpc assembler
2013-02-23 22:29:03 -07:00
Joshua Warner
73dda9c26e
begin splitting out powerpc assembler
2013-02-23 22:26:48 -07:00
Joshua Warner
22d6ed1bec
further split out arm assembler
2013-02-23 22:25:15 -07:00
Joshua Warner
fd59e1e08d
begin splitting out arm assembler
2013-02-22 20:47:56 -07:00
Joel Dice
686c2352c1
all tests now pass for Android class library build
2013-02-22 17:23:59 -07:00
Joel Dice
0a4a04cc09
Merge remote-tracking branch 'github/master' into dicej
2013-02-22 17:13:10 -07:00
Joshua Warner
fc84f62a65
prevent garbage collection as vm shuts down
2013-02-22 16:33:07 -07:00
Joel Dice
b32dfb674c
fix merge fallout (take 2)
2013-02-22 14:54:13 -07:00
Joel Dice
5e65468fef
fix merge fallout
2013-02-22 14:50:15 -07:00
Joel Dice
9060a31348
Merge remote-tracking branch 'github/master' into dicej
...
Conflicts:
src/classpath-openjdk.cpp
2013-02-22 14:43:20 -07:00
Joel Dice
d152f8cf74
fix openjdk build
2013-02-22 14:41:24 -07:00
Joel Dice
2f549dd3a3
fix RUNTIME_ARRAY_BODY regressions in classpath-openjdk.cpp
2013-02-22 14:20:09 -07:00
Joel Dice
8546ca5670
fix Avian classpath build
2013-02-22 11:55:01 -07:00
Joel Dice
201473cf87
more work on Android classpath port
2013-02-22 11:06:49 -07:00
Joshua Warner
d1a149a0a1
audit-codegen prototype working
2013-02-21 21:57:53 -07:00
Joshua Warner
aaa076f1df
move arg-parser.h to include
2013-02-21 20:14:37 -07:00
Joshua Warner
fe7bb5e640
Merge branch 'master' into wip
...
Conflicts:
makefile
2013-02-21 19:33:38 -07:00
Joshua Warner
a9e2984aaf
fix arm and powerpc build
2013-02-21 16:51:31 -07:00
Joshua Warner
68d28eab2e
insert RUNTIME_ARRAY_BODY to fix windows.cpp
2013-02-21 16:29:19 -07:00
Joshua Warner
af0e7767eb
Merge branch 'master' of github.com:ReadyTalk/avian
...
Conflicts:
makefile
2013-02-21 16:23:22 -07:00
Joshua Warner
ab9f9550cf
move tokenizer.h to include/avian/util/string.h, merge in the String declaration from object-writer/tools.h
2013-02-21 16:18:20 -07:00
Joel Dice
42d39b1af1
more Android class library work
2013-02-21 15:37:17 -07:00
Joel Dice
204bbc134d
fix invalid size calculation in ReleaseStringUTFChars
2013-02-21 15:36:01 -07:00
Joshua Warner
32044637cd
move bootimage generator to src/tools
2013-02-21 13:15:58 -07:00
Joshua Warner
186a3993b5
move system implementations to src/vm/system/
2013-02-21 13:11:29 -07:00
Joshua Warner
05b90b6544
begin splitting up type-generator
2013-02-21 07:51:42 -07:00
Joshua Warner
810a067613
move java-specific declarations out of common.h
2013-02-20 22:14:18 -07:00
Joshua Warner
48691bb50a
move stream.h to include, and type-generator to src/tools
2013-02-20 21:26:34 -07:00
Joshua Warner
f17b8cef08
move system.h to include
2013-02-20 20:42:09 -07:00
Joel Dice
f04f444f23
modify (THREAD_)RUNTIME_ARRAY definition so RUNTIME_ARRAY_BODY must be used
...
Previously, if you forgot to use RUNTIME_ARRAY_BODY to reference an
array declared with (THREAD_)RUNTIME_ARRAY, you wouldn't get a
compiler error until you tried to build on e.g. MSVC, where
runtime-sized stack arrays aren't supported. This change ensures you
find out regardless of what compiler you're using, which ought to
protect us from regressions going forward.
2013-02-20 17:20:17 -07:00
Joshua Warner
588b04af54
Merge branch 'master' into wip
2013-02-20 13:41:19 -07:00
Joshua Warner
41d84f7d5a
fix bootimage build
2013-02-20 13:40:11 -07:00
Joshua Warner
1f0833252d
Merge branch 'master' into wip
...
Conflicts:
src/codegen/compiler/event.cpp
src/codegen/x86/assembler.cpp
src/common.h
2013-02-20 11:27:39 -07:00
Joshua Warner
24ff91c229
move heap.h to include
2013-02-20 10:23:20 -07:00
Joel Dice
d414fd4c7b
more progress on Android class library port
...
Hello.java works. Yay.
2013-02-20 10:22:40 -07:00
Joshua Warner
52b2fd74ef
move math functions out of common.h, and into include/avian/util/math.h
2013-02-20 07:51:57 -07:00
Joshua Warner
b9e281612b
move runtime-array to include
2013-02-19 22:56:05 -07:00
Joshua Warner
263c0dee4f
move abort.h to include, add namespacing
2013-02-19 22:51:38 -07:00
Joshua Warner
987af120d8
move codegen headers to include/
2013-02-19 22:21:22 -07:00
Joshua Warner
77365dfcc1
move binary-to-object to new tree structure
2013-02-19 20:23:11 -07:00
Joel Dice
f45b95e1b5
progress towards Android classpath support
...
It now builds and links, but fails at runtime because
register_libcore_icu_ICU can't find the file it wants. We'll probably need to replace register_libcore_icu_ICU with a better-behaved version.
2013-02-19 16:48:33 -07:00
Joel Dice
0f524fcf16
first pass at Android classpath support
...
Stuff compiles, but linking breaks spectacularly. Next step is to
figure out how to build the dependencies without checking out and
building the entire Android platform.
2013-02-19 09:36:19 -07:00
Joshua Warner
43de16a94d
Merge branch 'master' into wip
...
Conflicts:
src/bootimage.cpp
2013-02-19 09:13:42 -07:00
Joshua Warner
46029939d3
begin work on audit-codegen
2013-02-19 09:06:25 -07:00
Joshua Warner
24c0fab9bf
add unit tests for arg parser
2013-02-19 09:06:25 -07:00
Joshua Warner
e9be3c4e07
move arg parser out of bootimage.cpp
2013-02-19 09:06:21 -07:00
Joshua Warner
984f987e03
further break out x86 assembler
2013-02-19 09:05:31 -07:00
Joshua Warner
61f03643e0
begin splitting up x86 assembler
2013-02-19 09:05:31 -07:00
Joshua Warner
49bfda3932
construct SiteMasks based on OperationMasks
2013-02-19 09:05:30 -07:00
Joshua Warner
4462b87f10
group typeMask and registerMask into OperandMask, for Architecture::plan
2013-02-19 09:05:30 -07:00
Joel Dice
fbbd718fe1
fix bootimage build
2013-02-16 08:36:29 -07:00
Joshua Warner
a5869c854f
fix interpret.cpp build
2013-02-15 20:30:20 -07:00
Joshua Warner
71765bb26f
fix cross-compile windows build
2013-02-15 09:53:02 -07:00
Joshua Warner
a3fb540ec3
add ArchitecturePlanTest
2013-02-15 07:35:17 -07:00
Joshua Warner
b4a73a2e0b
include runtime-array.h to fix arm build
2013-02-14 11:43:21 -07:00
Joshua Warner
2db0303e2f
further compiler cleanup / organization
2013-02-13 23:23:07 -07:00
Joel Dice
b8fd040ac1
include util/runtime-array.h in windows.cpp to fix build
2013-02-13 22:13:56 -07:00
Joel Dice
64d58bdb29
update bootimage.cpp and heapwalk.cpp to reflect function renames
2013-02-13 22:13:56 -07:00
Joshua Warner
94ddb62b5f
move FrameSiteEvent out of compiler.cpp
2013-02-13 22:13:56 -07:00
Joshua Warner
be86d26512
move BoundsCheckEvent out of compiler.cpp
2013-02-13 22:13:56 -07:00
Joshua Warner
d00950458f
move JumpEvent out of compiler.cpp
2013-02-13 22:13:56 -07:00
Joshua Warner
65b7cf047c
move BranchEvent out of compiler.cpp
2013-02-13 22:13:56 -07:00
Joshua Warner
18e6f28ff4
move MemoryEvent out of compiler.cpp
2013-02-13 22:13:55 -07:00
Joshua Warner
9c102bc1a8
move OperationEvent out of compiler.cpp
2013-02-13 22:13:55 -07:00
Joshua Warner
70f9209a6e
move TranslateEvent out of compiler.cpp
2013-02-13 22:13:55 -07:00
Joshua Warner
8a61b38a01
move CombineEvent out of compiler.cpp
2013-02-13 22:13:55 -07:00
Joshua Warner
5ad0eb86d3
move MoveEvent out of compiler.cpp
2013-02-13 22:13:55 -07:00
Joshua Warner
165c77d772
move ReturnEvent out of compiler.cpp
2013-02-13 22:13:55 -07:00
Joshua Warner
0f6e098b69
move CallEvent out of compiler.cpp
2013-02-13 22:13:55 -07:00
Joshua Warner
6d265374ec
move Reads out of compile.cpp
2013-02-13 22:13:55 -07:00
Joshua Warner
b0abc4e1e5
further split up compiler.cpp
2013-02-13 22:13:55 -07:00
Joshua Warner
952cad2360
move site out of compiler.cpp
2013-02-13 22:13:55 -07:00
Joshua Warner
740886d58e
begin splitting up compiler.cpp
2013-02-13 22:13:55 -07:00
Joshua Warner
ef5e534e1e
begin moving register allocator out of compiler.cpp
2013-02-13 22:13:55 -07:00
Joshua Warner
34471e5d60
factor out assert / abort / expect implementations
2013-02-13 22:13:52 -07:00
Joshua Warner
d7f088c9e7
adjust package structure in codegen (vm -> avian::codegen and avian::codegen::lir)
...
The eventual intent with the lir namespace is to formalize some of
the important bits of Assembler interface, to be tested, debug-printed,
and potentially, serialized.
Also, group arguments to apply(...) in OperandInfos
2013-02-12 17:47:57 -07:00
Joshua Warner
aacfb9ec85
fix unused function warnings in codegen/powerpc/assembler.cpp when building with clang
2013-02-12 17:45:19 -07:00
Joshua Warner
3589d5c205
Merge branch 'master' of git://github.com/ReadyTalk/avian
...
Conflicts:
src/codegen/arm/assembler.cpp
src/common.h
src/machine.cpp
2013-02-12 17:37:19 -07:00
Joshua Warner
f7b49ddb06
allow codegen targets (Architectures and Assemblers) to co-exist
...
The primary motivation behind this is to allow all the different Assemblers
to be built at once, on a single machine. This should dramatically reduce
the time required to make sure that a particular change doesn't break
the build for one of the not-so-common architectures (arm, powerpc)
Simply pass "codegen-targets=all" to make to compile all
src/codegen/<arch>/assembler.cpp.
Note that while these architectures are built, they will not be fully-
functional. Certain stuff is assumed to be the same across the entire
build (such as TargetBytesPerWord), but this isn't the case anymore.
2013-02-12 17:16:40 -07:00
Joel Dice
86c92e26cb
Merge commit '752d02e7786b807185e3f4cd254ee988c01f830f' into HEAD
...
Conflicts:
classpath/java-io.cpp
makefile
src/bootimage.cpp
src/interpret.cpp
src/machine.cpp
src/windows.cpp
2013-02-12 10:47:28 -07:00
Joel Dice
8a7b6488d4
Merge remote branch 'osmandapp/upstream'
2013-02-12 09:26:01 -07:00
Joel Dice
dc943c250a
delay incrementing Thread::criticalLevel until after entering ActiveState
...
If we increment the value while we're still in IdleState, another
thread may try to GC before we are able to enter ActiveState, which
will lead to an assertion failure when the footprint function is
called.
2013-02-12 08:15:39 -07:00
Joshua Warner
68776e5d73
move all codegen source in to codegen/ dir
2013-02-10 18:55:38 -07:00
Joshua Warner
964d054117
move RUNTIME_ARRAY into it's own header
2013-02-10 18:07:11 -07:00
Joshua Warner
5dd770d7ea
rename cast -> fieldAtOffset
2013-02-10 18:07:03 -07:00
Joshua Warner
2a1834e48a
rename mask -> maskAlignedPointer
2013-02-10 18:06:48 -07:00
Joshua Warner
d26d8fdb9f
rename ceiling -> ceilingDivide
2013-02-10 18:06:15 -07:00
Alexey Pelykh
9c632b778b
Proper warning disabling
2013-02-10 09:41:46 +02:00
Alexey Pelykh
5d35d64c80
Disable operator new warning
2013-02-10 09:31:41 +02:00
Alexey Pelykh
d5d2e50ac7
Trace writeout refactor
2013-02-09 09:42:51 +02:00
Alexey Pelykh
83e55ce9cc
RUNTIME_ARRAY usage
2013-02-09 09:42:50 +02:00
Alexey Pelykh
e4bd01f7f3
Comment out printTrace
2013-02-09 09:42:49 +02:00
Alexey Pelykh
f3c443dbfa
Fix dword<>qword mistake
2013-02-09 09:42:47 +02:00
Alexey Pelykh
b918389672
Support built-in jars when wusing multi-library
2013-02-09 09:42:45 +02:00
Alexey Pelykh
74c9f60b98
Fix crash if no avian.boostrap is specified (oops)
2013-02-09 09:42:36 +02:00
Alexey Pelykh
d0ac63292c
Fix crash if no avian.boostrap is specified (oops)
2013-02-09 09:42:35 +02:00
Alexey Pelykh
bd2a836395
Fix crash if no avian.boostrap is specified (oops)
2013-02-09 09:42:34 +02:00
Alexey Pelykh
bde33c97f8
Fix crash if no avian.boostrap is specified
2013-02-09 09:42:33 +02:00
Alexey Pelykh
9ed312451a
Allow avian.bootstrap to accept multiple libraries
2013-02-09 09:42:32 +02:00
Alexey Pelykh
c13149088e
Fix crash on memory validation
2013-02-09 09:42:31 +02:00
Alexey Pelykh
c6694287e9
Finally, proper jvm.dll linking for WP8
2013-02-09 09:42:29 +02:00
Alexey Pelykh
d51db00136
Allow output of exceptions to debugger. Generate WinMD file
2013-02-09 09:42:28 +02:00
Alexey Pelykh
4228f69a0d
Additional AOT_ONLY ifdef
2013-02-09 09:42:26 +02:00
Alexey Pelykh
acdd297fb2
Fixes to WP8/WinRT support
2013-02-09 09:42:25 +02:00
Alexey Pelykh
dca12d3cd0
WinRT/WP8 process=compile
2013-02-09 09:42:22 +02:00
Alexey Pelykh
4d03650544
Replaced TODO comments with messages ; More correct AVIAN_AOT_ONLY usage
2013-02-09 09:42:21 +02:00
Alexey Pelykh
1b43caf815
Makefile fix
2013-02-09 09:42:20 +02:00
Alexey Pelykh
2f2cac556c
Windows Phone 8 / Windows RT initial support
...
Conflicts:
makefile
2013-02-09 09:42:19 +02:00
Alexey Pelykh
b1990ba55f
Android toolchain
2013-02-09 09:42:14 +02:00
Victor Shcherb
3a42db9f6f
Add android platform
2013-02-09 09:42:13 +02:00
Joel Dice
f9b3be0301
fix format string in loadLibrary call to snprintf
...
"%*s" means "at least", whereas "%.*s" means at most, and the latter
is what I intended. This only became noticable as of 9f22a70
, when I
added another directory to the library path, which caused loadLibrary
to fail to find libraries in either directory.
2013-02-08 08:24:06 -07:00
Joel Dice
6d4f797b66
fix handling of non-ascii characters in filenames on Windows
2013-02-07 11:39:04 -07:00
Joel Dice
5241660463
fix SIGSEGV and off-by-one error in logDebug
...
We must use separate va_start/va_end pairs for each call to vsnprintf
on Linux and possibly other platforms in order to avoid a crash.
Also, we need to give it room to null terminate the string at the
right point.
2013-02-07 09:33:22 -07:00
Joel Dice
d97fe5304f
use THREAD_RUNTIME_ARRAY instead of RUNTIME_ARRAY where appropriate
...
This ensures that if the stack is unwound for an exception we'll still
release the memory.
2013-02-07 09:33:20 -07:00
Alexey Pelykh
9e4144f92b
Trace writeout refactor
2013-02-07 11:39:28 +02:00
Alexey Pelykh
e6fc4e3bea
RUNTIME_ARRAY usage
2013-02-07 11:39:27 +02:00
Alexey Pelykh
edbea8ac2b
Comment out printTrace
2013-02-07 11:39:27 +02:00
Alexey Pelykh
33d4f008f4
Fix dword<>qword mistake
2013-02-07 11:39:25 +02:00
Alexey Pelykh
1d60ababd3
Support built-in jars when wusing multi-library
2013-02-07 11:39:23 +02:00
Alexey Pelykh
3287b1354a
Fix crash if no avian.boostrap is specified (oops)
2013-02-07 11:39:14 +02:00
Alexey Pelykh
ba0ec3759d
Fix crash if no avian.boostrap is specified (oops)
2013-02-07 11:39:13 +02:00
Alexey Pelykh
8e879f80a7
Fix crash if no avian.boostrap is specified (oops)
2013-02-07 11:39:12 +02:00
Alexey Pelykh
2e3856211b
Fix crash if no avian.boostrap is specified
2013-02-07 11:39:11 +02:00
Alexey Pelykh
e523547b19
Allow avian.bootstrap to accept multiple libraries
2013-02-07 11:39:10 +02:00
Alexey Pelykh
9b9bc1de00
Fix crash on memory validation
2013-02-07 11:39:09 +02:00
Alexey Pelykh
7cd194b5de
Finally, proper jvm.dll linking for WP8
2013-02-07 11:39:07 +02:00
Alexey Pelykh
5a1b478b89
Allow output of exceptions to debugger. Generate WinMD file
2013-02-07 11:39:06 +02:00
Alexey Pelykh
fa034c7526
Additional AOT_ONLY ifdef
2013-02-07 11:39:04 +02:00
Alexey Pelykh
4840f4a019
Fixes to WP8/WinRT support
2013-02-07 11:39:03 +02:00
Alexey Pelykh
9c67acfaf1
WinRT/WP8 process=compile
2013-02-07 11:39:00 +02:00
Alexey Pelykh
a78959a480
Replaced TODO comments with messages ; More correct AVIAN_AOT_ONLY usage
2013-02-07 11:38:59 +02:00
Alexey Pelykh
c5adad9dce
Makefile fix
2013-02-07 11:38:58 +02:00
Alexey Pelykh
0cbaad6495
Windows Phone 8 / Windows RT initial support
...
Conflicts:
makefile
2013-02-07 11:38:57 +02:00
Alexey Pelykh
b0cae77b2a
Android toolchain
2013-02-07 11:38:53 +02:00
Victor Shcherb
4cd8ab5910
Add android platform
2013-02-07 11:38:52 +02:00
Joel Dice
5a07e04d56
assert that there are no outstanding Get*Critical requests during allocation
...
When GetStringCritical or GetPrimitiveArrayCritical are called, the VM
cannot risk new Java heap allocations until the corresponding release
method is called because allocations may result in GC, which cannot
happen while a string or array is pinned in memory. We already have a
check for this latter in the footprint function used during GC, but
it's best to catch the problem as early as possible.
2013-02-05 09:48:20 -07:00
Joel Dice
5dcf6eae5a
fix GC safety issue in MyClasspath::updatePackageMap
2013-02-03 20:29:24 -07:00
Joel Dice
e8f8ebdc67
fail quickly if an object allocation cannot be satisfied
...
Previously, we would blithely exceed the heap ceiling and force the
next allocation to deal with the problem, including a major GC and
possible OutOfMemoryError. As of this commit, we throw an error
immediately if we find that the allocation will push us over the
ceiling.
2013-02-03 15:53:36 -07:00
Joel Dice
23bb2e8743
force a GC in allocate3 if the heap limit has been exceeded
...
Otherwise, we'll throw an OOME even though there may be enough
unreachable objects eligible for collection to get back below the
limit.
2013-02-03 15:20:53 -07:00
Joel Dice
3db9e73aa1
fix GC safety issues in classpath-openjdk.cpp
2013-02-03 15:19:35 -07:00
Joel Dice
80c8940b7f
ensure joining threads are always notified when a thread exits
...
Previously, we'd only do this if the thread exited without throwing an
exception. Now we do it regardless.
2013-02-03 15:18:32 -07: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
0c5471d25e
remove temporary #error used for debugging
...
Sorry, that wasn't supposed to be checked in.
2013-01-28 16:24:08 -07:00
Joel Dice
67fd707254
fix handling of unusual exception handler layout
...
Scala sometimes generates bytecode such that the scope of an exception
handler starts at another exception handler, e.g.:
Exception table:
from to target type
290 372 382 any
382 451 451 any
290 372 451 any
Avian's compiler was incorrectly initializing the stack frame for the
second handler in this case. This commit fixes the problem.
2013-01-26 22:06:53 -07:00
Joel Dice
70a7a50a49
fix int-to-long conversions from memory on x86_32
...
The instruction for 32-bit-to-64-bit sign extension on x86_32 requires
that the input value be placed in EAX and the sign extension in EDX.
However, the compiler can get confused if the input value is in memory
addressed via one of those registers and doesn't know how to move it.
This patch works around that limitation by doing the move explicitly
in MemoryEvent::compile if necessary.
2013-01-26 17:15:15 -07:00
Joel Dice
1a44ec9eef
fix incorrect macro name in bootimage.cpp
2013-01-25 16:47:31 -07:00
Joel Dice
2131adf3aa
fix Windows OpenJDK build
2013-01-25 08:07:47 -07:00
Joel Dice
844520a402
fix embed.cpp build for 64-bit Windows
2013-01-25 07:57:57 -07:00
Joel Dice
36eee724c9
check argument types in JVM_InvokeMethod
...
Method.invoke must throw an IllegalArgumentException if it receives
the wrong number or types of arguments, and since this isn't done by
the OpenJDK class library, we must do it in the VM.
2013-01-24 12:16:41 -07:00