Joshua Warner
51b510cbea
first pass at cmake + visual studio support
2014-07-30 14:15:15 -06:00
Joel Dice
9f182d4613
Merge pull request #316 from bigfatbrowncat/fixing-windows-build
...
Fixed Android build on Windows
2014-07-29 08:43:39 -06:00
Vasily Litvinov
d668c6a259
Fixed Android build on Windows
2014-07-29 13:01:51 +04:00
Joshua Warner
857c155980
Merge pull request #313 from dicej/lzma-bootimage
...
fix LZMA/bootimage build
2014-07-28 09:49:08 -06:00
Joel Dice
a1e9315fa2
fix LZMA/bootimage build
...
This includes some tweaks to README.md and makefile to ensure the
directions in the former for building a bootimage actually work.
2014-07-28 09:19:39 -06:00
Joel Dice
b811ca60c1
Merge pull request #291 from joshuawarner32/cpp11
...
Begin using c++11 features
2014-07-24 13:13:30 -06:00
Joel Dice
bcbce54b9e
fix iOS build when using recent versions of OpenJDK 7
...
This is based on recent feedback on the Avian group. I've tested it
using both OpenJDK 7u40 and 7u60.
2014-07-24 11:20:17 -06:00
Joshua Warner
31de9a48c9
reformat
2014-07-24 10:09:29 -06:00
Joshua Warner
1ad1fe9048
use enum class in ir
2014-07-24 10:09:29 -06:00
Joshua Warner
060b5c8f13
use c++11 variadic templates in Compiler::call
2014-07-24 10:09:29 -06:00
Joshua Warner
d8ddc95315
use c++11 enhanced-for and auto in type-generator
2014-07-24 10:09:29 -06:00
Joshua Warner
d48093b777
fix unused variable warning when building with cmake
2014-07-24 09:42:44 -06:00
Joshua Warner
d248ad53b0
add initial cmake script (only builds parts of the code)
2014-07-24 09:36:40 -06:00
Joshua Warner
41cb6fabf5
split avian::system::crash into its own file
2014-07-24 09:36:40 -06:00
Joshua Warner
c26fb78f2c
Merge pull request #307 from dicej/posix-spawn
...
fix Processes test failure for openjdk-src build with recent versions of...
2014-07-22 17:42:40 -06:00
Joel Dice
1bee015af3
fix Processes test failure for openjdk-src build with recent versions of OpenJDK 7
...
It looks like the UNIXProcess class has added posix_spawn support,
which is enabled by default unless overriden by the
jdk.lang.Process.launchMechanism system property. For some reason I
haven't bothered to investigate, posix_spawn fails on MacOS, so this
patch sets the aforementioned property to "fork" to get the old,
working behavior.
2014-07-22 17:06:55 -06:00
Joshua Warner
f3968d2401
fix compiler problems discovered in openjdk-src arm bootimage build
...
This particular problem was introduced in the recent "compiler types" refactor.
It's unclear why it wasn't encountered before now.
Note that the full, unproguarded bootimage build is still blocked by #305
2014-07-22 15:38:43 -06:00
Pierre Carrier
375703fbd3
src/jnienv.cpp: support G size suffix
2014-07-18 06:09:53 -07:00
Joel Dice
4c8f3933f5
fix order of operations regression in referenceTargetUnreachable
...
We need to dereference the GcJreference** before we change what it
points to. The code was mistakenly reordered in the recent type
refactoring.
2014-07-17 17:53:36 -06:00
Joshua Warner
4d79f3bea1
Replace Allocator with Alloc or AllocOnly where possible
2014-07-16 18:51:35 -06:00
Joshua Warner
fa1e3d74c0
reduce Allocator interface
2014-07-16 18:51:29 -06:00
Joshua Warner
2d0ac3ac17
reduce vm::Zone interface
2014-07-16 18:41:02 -06:00
Joshua Warner
eb92c904c6
split Tokenizer into its own header
2014-07-16 18:41:02 -06:00
Joshua Warner
29ee088f19
remove unused Half type
2014-07-16 18:41:02 -06:00
Joshua Warner
80cf745424
move executable allocator out of System class
2014-07-16 18:40:57 -06:00
Joshua Warner
a1631c00f9
use size_t in Allocator
2014-07-16 18:10:51 -06:00
Joel Dice
cae4b49005
fix heapdump=true build
2014-07-16 15:51:48 -06:00
Joshua Warner
2778531873
fix arm build
2014-07-16 08:59:50 -06:00
Joel Dice
4b7b3d2680
Merge pull request #295 from joshuawarner32/fix-windows-build
...
fix windows build
2014-07-15 12:31:10 -06:00
Joshua Warner
bfddef54c6
fix openjdk-src build (oversight from type-generator refactor)
2014-07-15 08:31:22 -06:00
Joshua Warner
21cec8834f
fix LLD macro for gcc >= 4.8 on windows
2014-07-14 10:42:53 -06:00
Joshua Warner
2f94c5b03d
fix windows build
2014-07-14 08:57:03 -06:00
Joel Dice
2a43e68c16
fix all the bugs
...
So there I was, planning to just fix one little bug: Thread.holdsLock
and Thread.yield were missing for the Android class library. Easy
enough, right? So, I added a test, got it passing, and figured I'd go
ahead and run ci.sh with all three class libraries. Big mistake.
Here's the stuff I found:
* minor inconsistency in README.md about OpenSSL version
* untested, broken Class.getEnclosingMethod (reported by Josh)
* JNI test failed for tails=true Android build
* Runtime.nativeExit missing for Android build
* obsolete assertion in CallEvent broke tails=true Android build
* obsolete superclass field offset padding broke bootimage=true Android build
* runtime annotation parsing broke bootimage=true Android build
(because we couldn't modify Addendum.annotationTable for classes in
the heap image)
* ci.sh tried building with both android=... and openjdk=..., which
the makefile rightfully balked at
Sorry this is all in a single commit; I didn't expect so many
unrelated issues, and I'm too lazy to break them apart.
2014-07-12 16:57:24 -06:00
Joshua Warner
80f19abf3a
put all commented code in if(false) blocks instead; fix ensuing broken code
2014-07-12 10:16:03 -06:00
Joshua Warner
8a4b043ee3
generate makeZeroed method, to return a zero-initialzed instance of a Gc* class
2014-07-11 13:47:43 -06:00
Joshua Warner
836cc41320
bulk, global reformat
2014-07-11 13:25:22 -06:00
Joshua Warner
7642b94308
reformat changes since master
2014-07-11 13:25:22 -06:00
Joshua Warner
cbad6931af
retypedef object to GcObject*, remove (almost?) all unnecessary reinterpret_casts
2014-07-11 13:25:22 -06:00
Joshua Warner
b0490b8233
finish using setters
2014-07-11 13:25:22 -06:00
Joshua Warner
4367867be9
use setters in classpath-android.cpp
2014-07-11 13:25:22 -06:00
Joshua Warner
43b9cce7d0
don't mark nogc fields
2014-07-11 13:25:21 -06:00
Joshua Warner
40e71a4856
use setters in machine.cpp
2014-07-11 13:25:21 -06:00
Joshua Warner
880b9fa910
use setters in machine.h
2014-07-11 13:25:21 -06:00
Joshua Warner
cc4eaae706
use setters in compile.cpp
2014-07-11 13:25:21 -06:00
Joshua Warner
e548d37666
use setters in classpath-common.h
2014-07-11 13:25:21 -06:00
Joshua Warner
3a9454117e
use setters in util.cpp
2014-07-11 13:25:21 -06:00
Joshua Warner
07a9599d1a
generate new setters in type-generator
2014-07-11 13:25:21 -06:00
Joshua Warner
ed1f34dca3
formalize MyProcessor::roots (for Compiler) in types.def
2014-07-11 13:25:21 -06:00
Joshua Warner
052f2498aa
formalize Machine::roots in types.def
2014-07-11 13:25:21 -06:00
Joshua Warner
75f2dd013c
remove old function-based accessors
2014-07-11 13:25:21 -06:00
Joshua Warner
a1583f1ecc
touch up type safety in types.def
2014-07-11 13:25:20 -06:00
Joshua Warner
c796bdbde4
add bootimage-generator/main.cpp changes
2014-07-11 13:25:20 -06:00
Joshua Warner
b4798550a3
add machine.cpp changes
2014-07-11 13:25:20 -06:00
Joshua Warner
b5a1d97bd1
add interpret.cpp changes
2014-07-11 13:25:20 -06:00
Joshua Warner
9f0327bb9e
add process and classpath-avian changes
2014-07-11 13:25:20 -06:00
Joshua Warner
86d9249f29
add builtin.cpp changes
2014-07-11 13:25:20 -06:00
Joshua Warner
924f242e66
add compile.cpp changes
2014-07-11 13:25:20 -06:00
Joshua Warner
4df8f59f3c
staticly type finalizer and cleaner
2014-07-11 13:25:20 -06:00
Joshua Warner
1e201e54fc
staticly type GcContinuation*
2014-07-11 13:25:20 -06:00
Joshua Warner
b8ddc779a2
staticly type GcReference
2014-07-11 13:25:20 -06:00
Joshua Warner
bb331e9414
make callNode and methodRuntimeData.native better statically typed
2014-07-11 13:25:19 -06:00
Joshua Warner
1da8170c66
apply jnienv + java-common changes
2014-07-11 13:25:19 -06:00
Joshua Warner
9c93c5989c
apply classpath-common.h changes
2014-07-11 13:25:19 -06:00
Joshua Warner
00e2307c39
apply machine.h changes
2014-07-11 13:25:19 -06:00
Joshua Warner
9ffbd7e9fe
staticly type GcClassLoader instances
2014-07-11 13:25:19 -06:00
Joshua Warner
6a0502bbfe
add util.cpp/.h changes
2014-07-11 13:25:19 -06:00
Joshua Warner
51368651dc
better statically type Processor interface
2014-07-11 13:25:19 -06:00
Joshua Warner
0ec87c6aa1
statically type Addendum.pool better
2014-07-11 13:25:19 -06:00
Joshua Warner
9f5912c2b6
add stronger typing to method.code
2014-07-11 13:25:19 -06:00
Joshua Warner
9248f8f8ad
add stronger typing to code.singleton
2014-07-11 13:25:18 -06:00
Joshua Warner
4754a92b75
split code.stackMap out of code.pool use
2014-07-11 13:25:18 -06:00
Joshua Warner
083dc17810
add stronger typing to code.lineNumberTable
2014-07-11 13:25:18 -06:00
Joshua Warner
194e3b2701
add VMClass changes
2014-07-11 13:25:18 -06:00
Joshua Warner
9b36dca846
generate better typed accessors from type-generator (and switch to using standard library there)
2014-07-11 13:25:17 -06:00
Joshua Warner
263e349cae
rename assert to assertT, to avoid conflict with std assert macro
2014-07-11 09:32:57 -06:00
Joshua Warner
7ea4b584b8
include stdc++ <new>
2014-07-11 09:32:57 -06:00
Joshua Warner
5adb558355
add Code to classpath
2014-07-11 09:32:57 -06:00
Joshua Warner
43bd838c86
generate accessors for array fields
2014-07-11 09:32:57 -06:00
Joshua Warner
b5699cc9dc
move Machine::*Type to GcObject::*Type
2014-07-11 09:32:55 -06:00
Joshua Warner
13452beaab
use arg-parser in type-generator
2014-07-11 09:12:34 -06:00
Joel Dice
1b83ef7eb3
only wrap Exceptions in ExceptionInInitializerErrors, not Errors
2014-07-10 13:43:10 -06:00
Joel Dice
5d3c612d0e
fix JNIEnv::FindClass calls from JNI_OnLoad for all supported class libraries
...
This also fixes the some Android build rot and updates the version of
OpenSSL used.
2014-07-01 10:53:26 -06:00
Joel Dice
735eaaba21
Merge remote-tracking branch 'remotes/dicej/findclass-onload'
2014-07-01 08:39:56 -06:00
Joel Dice
254e3f938d
fix unused declaration/definition warnings from GCC 4.9
2014-06-30 09:54:01 -06:00
Joel Dice
f40dcddd8d
only generate crash dump if faulting instruction is in main executable
...
The VM should only assume it should/will crash if it triggers an
e.g. EXCEPTION_ACCESS_VIOLATION itself. In other words, if some
non-VM code triggers such an event, the VM should let that code handle
it as appropriate. Avian already does this properly, but it also
generates crash dumps for each event encountered if avian.crash.dir is
set, regardless if whether the VM triggered it or not. This can be a
problem if such events are generated frequently -- a full memory dump
takes a long time to write and a lot of disk space.
Ideally, we'd have some reliable way to determine whether the faulting
instruction pointer belongs to the VM or not, but the closest thing I
could come up with was to compare the module that owns the address
with the module representing the main executable. This can lead to
both false positives (e.g. application code in the main executable
which is not part of the VM) and false negatives (e.g. when the VM is
loaded from a library instead of the main executable), but it's still
an improvement over the status quo.
Even better would be to ensure that the VM's exception handler is the
very last one to run, so that we know for sure that the error is
unrecoverable and thus it is appropriate to do a full memory dump.
2014-06-27 12:45:05 -06:00
Joel Dice
9e7d27bd15
Merge pull request #281 from joshuawarner32/darwin-platform-reorg
...
rename platform=darwin -> platform={ios,macosx}, fix ios simulator build
2014-06-24 15:49:54 -06:00
Joel Dice
4dc76a50a2
fix case of JNIEnv::FindClass called from JNI_OnLoad
...
If an JNI_OnLoad implementation calls FindClass when using the OpenJDK
class library, the calling method on the Java stack will be
ClassLoader.loadLibrary. However, we must use the class loader of the
class attempting to load the library in this case, not the system
classloader.
Therefore, we now maintain a stack such that the latest class to load
a library in the current thread is at the top, and we use that class
whenever FindClass is called by ClassLoader.loadLibrary (via
JNI_OnLoad).
Note that this patch does not attempt to address the same problem for
the Avian or Android class libraries, but the same strategy should
work for them as well.
2014-06-23 17:25:42 -06:00
Joel Dice
9d4f9901bc
remove redundant PROTECT usage
...
This was causing crashes at GC time since we ended up visiting the
same reference twice in a single GC cycle.
2014-06-23 10:40:22 -06:00
Joshua Warner
9a6f7bd0bf
rename platform=darwin -> platform={ios,macosx}, fix ios simulator build
2014-06-22 12:30:52 -06:00
Joshua Warner
ada6ce4cc3
fix arm compiler abort
2014-06-11 09:55:39 -06:00
Joel Dice
975b1ddfd8
Merge pull request #275 from mikehearn/prop-fix
...
Set a property that the LambdaWorks SCrypt library expects to be present
2014-06-05 13:37:47 -06:00
Joel Dice
b16dd4e63f
only enter IdleState if necessary in idleIfNecessary
...
There's no need to enter IdleState (and incur synchronization
overhead) unless another thread is waiting to enter ExclusiveState.
This change improves the performance of the MemoryRamp test by a
factor of about 100.
2014-06-05 07:49:49 -06:00
Mike Hearn
87125874b5
Set a property that the LambdaWorks SCrypt library expects to be present.
2014-06-05 21:32:39 +08:00
Joshua Warner
05d80aee8b
remove static references to TargetBytesPerWord in Compiler
2014-06-01 14:57:05 -06:00
Joshua Warner
1fb6a0bceb
fix up creation of ir::Type
2014-06-01 14:22:51 -06:00
Joshua Warner
68b725900e
remove old Subroutine comments
2014-06-01 10:04:56 -06:00
Joshua Warner
ec2e153aa8
fixup comments in Subroutine
2014-05-31 21:28:27 -06:00
Joshua Warner
9ed6a16340
make function and constant naming clearer (code review feedback)
2014-05-31 19:39:36 -06:00
Joshua Warner
1d86e668cb
inline Frame::*ed* code
2014-05-30 23:57:07 -06:00
Joshua Warner
955f4918b4
parameterize many Frame:: methods by type
2014-05-30 23:57:02 -06:00
Joshua Warner
7abbace8fb
replace Frame::StackType with ir::Type
2014-05-30 23:40:24 -06:00
Joshua Warner
37d104871c
test line number table generation in subroutines
2014-05-30 23:40:24 -06:00
Joshua Warner
9273d5ca39
remove redundant Compiler::initLocal footprint parameter
2014-05-30 23:40:24 -06:00
Joshua Warner
b6a3ed763c
add assert in Compiler::initLocal and fix ensuing problems
2014-05-30 23:40:24 -06:00
Joshua Warner
9a54c50db6
make asserts in loadLocal and storeLocal more strict
2014-05-30 23:40:23 -06:00
Joshua Warner
91c5599fc0
remove redundant Compiler::storeLocal footprint parameter
2014-05-30 23:40:23 -06:00
Joshua Warner
cc4525c31c
add type/footprint assert in Compiler::storeLocal
2014-05-30 23:40:23 -06:00
Joshua Warner
e7837c243e
remove redundant size parameter to appendBranch, rename type -> op
2014-05-30 23:40:23 -06:00
Joshua Warner
0eda1d7d11
add type asserts in appendBranch
2014-05-30 23:40:23 -06:00
Joshua Warner
c259faf24a
remove redundant size parameters to appendReturn and appendCall
2014-05-30 23:40:23 -06:00
Joshua Warner
9282c78549
add type asserts in appendReturn and appendCall
2014-05-30 23:40:23 -06:00
Joshua Warner
148d35bab5
remove redundant size parameters to appendCombine and appendTranslate
2014-05-30 23:40:23 -06:00
Joshua Warner
d67820054e
add type asserts in appendCombine and appendTranslate
2014-05-30 23:40:23 -06:00
Joshua Warner
008bb6b86e
remove redundant Compiler::unaryOp type parameter
2014-05-30 23:40:23 -06:00
Joshua Warner
a0443f0ef1
add type asserts in Compiler::unaryOp
2014-05-30 23:40:22 -06:00
Joshua Warner
b14709c54c
remove redundant Compiler::condJump type parameter
2014-05-30 23:40:22 -06:00
Joshua Warner
e3354617a6
add type asserts in Compiler::condJump
2014-05-30 23:40:22 -06:00
Joshua Warner
33d946d249
remove redundant Compiler::store srcType parameter
2014-05-30 23:40:22 -06:00
Joshua Warner
f6bc51647e
add type assert in Compiler::store, fix ensuing problems
2014-05-30 23:40:22 -06:00
Joshua Warner
e3d01746e8
remove redundant Compiler::truncate srcType parameter
2014-05-30 23:40:22 -06:00
Joshua Warner
3029bb2d7e
add type asserts in Compiler::truncate
2014-05-30 23:40:22 -06:00
Joshua Warner
b853f1a594
remove redundant f2i & i2f aType parameter
2014-05-30 23:40:22 -06:00
Joshua Warner
c9313d5802
add type assert in f2i & i2f
2014-05-30 23:40:22 -06:00
Joshua Warner
c843a97e23
remove redundant f2f aType parameter
2014-05-30 23:40:21 -06:00
Joshua Warner
963b371e04
remove redundant load srcType parameter
2014-05-30 23:40:21 -06:00
Joshua Warner
69966f1d36
add type assert in load, fix ensuing problems
2014-05-30 23:40:21 -06:00
Joshua Warner
6fdd5d13ca
remove redundant return_ type parameter
2014-05-30 23:40:21 -06:00
Joshua Warner
746c0fa0e8
remove ir::Type::Invalid, no longer needed for Subroutine
2014-05-30 23:40:21 -06:00
Joshua Warner
5ad1a14a73
explode Subroutines in compile.cpp rather than handling them in Compiler
2014-05-30 23:40:21 -06:00
Joshua Warner
781977d19c
add debug-util for printing java bytecode as it's compiled
2014-05-30 23:40:21 -06:00
Joshua Warner
2e40d38078
enforce more strong typing in compiler
2014-05-30 23:40:15 -06:00
Joshua Warner
7b0d577430
fix some return type & intrinsic typing
2014-05-30 23:19:41 -06:00
Joshua Warner
cb7f570f20
begin enforcing more strong typing
2014-05-30 22:51:03 -06:00
Joshua Warner
43eb49cf53
fix sizing of some stack ints
2014-05-30 22:41:11 -06:00
Joshua Warner
d62d083733
remove stack manipulation from AvianCallingConvention loop
2014-05-30 22:41:11 -06:00
Joshua Warner
9f36a8e0ec
prepare to move stack manipulation out of CallEvent
2014-05-30 22:41:11 -06:00
Joshua Warner
ae534bed5f
cleanup
2014-05-30 22:41:11 -06:00
Joshua Warner
cfc3bd212b
remove stack manipulation from NativeCallingConvention calls
2014-05-30 22:41:11 -06:00
Joshua Warner
fe2962830c
remove unused CallEvent::argumentStack variable, prepare to remove stack manipulation from NativeCallingConvention calls
2014-05-30 22:41:11 -06:00
Joshua Warner
d2e9911161
add asserts in CallEvent
2014-05-30 22:41:11 -06:00
Joshua Warner
1318b9ca2a
remove redundant CallEvent::argumentCount parameter
2014-05-30 22:41:11 -06:00
Joshua Warner
f9cbca8f7d
pair up stack for NativeCallingConvention
2014-05-30 22:41:11 -06:00
Joshua Warner
69edeaadee
remove redundant Compiler::stackCall footprint argument
2014-05-30 22:41:11 -06:00
Joshua Warner
3c9a453d17
add extra asserts in CallEvent
2014-05-30 22:41:11 -06:00
Joshua Warner
97ce7d2b4e
pass CallEvent arguments in Slice as well
2014-05-30 22:41:10 -06:00
Joshua Warner
4e00a1e304
add Frame::referenceStackCall
2014-05-30 22:41:10 -06:00
Joshua Warner
3aa85f2494
move return handling into Frame::stackCall
2014-05-30 22:41:10 -06:00
Joshua Warner
ad3ec1abf3
introduce Frame::stackCall util
2014-05-30 22:41:10 -06:00
Joshua Warner
86a98240b4
remove useless static_casts to retrieve ir::Value::type
2014-05-30 22:41:10 -06:00
Joshua Warner
479c056b2c
move Compiler::Operand to ir::Value
2014-05-30 22:41:10 -06:00